fix: enforce one active logical album grant
This commit is contained in:
1 parent
74ab2eb85f
commit
c400167b8f
9 files changed
+577
-45
No files matched your search
@@ -77,6 +77,28 @@
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
},
|
||||
"album_grants_editorial_active_album_unique": {
|
||||
"name": "album_grants_editorial_active_album_unique",
|
||||
"columns": [
|
||||
{
|
||||
"expression": "editorial_account_id",
|
||||
"isExpression": false,
|
||||
"asc": true,
|
||||
"nulls": "last"
|
||||
},
|
||||
{
|
||||
"expression": "lower(\"immich_album_id\")",
|
||||
"asc": true,
|
||||
"isExpression": true,
|
||||
"nulls": "last"
|
||||
}
|
||||
],
|
||||
"isUnique": true,
|
||||
"where": "\"album_grants\".\"revoked_at\" is null",
|
||||
"concurrently": false,
|
||||
"method": "btree",
|
||||
"with": {}
|
||||
}
|
||||
},
|
||||
"foreignKeys": {
|
||||
@@ -111,9 +133,9 @@
|
||||
"uniqueConstraints": {},
|
||||
"policies": {},
|
||||
"checkConstraints": {
|
||||
"album_grants_canonical_immich_album_id_check": {
|
||||
"name": "album_grants_canonical_immich_album_id_check",
|
||||
"value": "\"album_grants\".\"immich_album_id\" ~ '^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$'"
|
||||
"album_grants_immich_album_id_uuid_check": {
|
||||
"name": "album_grants_immich_album_id_uuid_check",
|
||||
"value": "\"album_grants\".\"immich_album_id\" ~* '^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$'"
|
||||
}
|
||||
},
|
||||
"isRLSEnabled": false
|
||||
@@ -1498,4 +1520,4 @@
|
||||
"schemas": {},
|
||||
"tables": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user