Commit 6c0ee2a
fix(sqlite): include _tenant in shared perms UNIQUE constraint
Match MariaDB's shared shape: under shared tables UNIQUE perms is
(_document, _type, _permission, _tenant). Without _tenant the upsert
path's perm INSERT collides when two tenants legitimately hold the
same role on the same document — exactly what the SharedTables/SQLite
upsert tests trip over once the cursor cascade is gone.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2e0ed26 commit 6c0ee2a
1 file changed
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
228 | 232 | | |
229 | 233 | | |
230 | 234 | | |
| |||
0 commit comments