Removed broken CONSTRAINT from perms table creation.

This commit is contained in:
flash 2023-12-16 18:51:17 +00:00
parent 133e2f420c
commit b4f5dd0660

View file

@ -41,9 +41,7 @@ final class NewPermissionsSystem_20230830_213930 implements IDbMigration {
$conn->execute('
ALTER TABLE msz_perms
ADD CONSTRAINT perms_53bit
CHECK (perms_allow >= 0 AND perms_deny >= 0 AND perms_allow <= 9007199254740991 AND perms_deny <= 9007199254740991),
ADD CONSTRAINT perms_only_user_or_role
CHECK ((user_id IS NULL AND role_id IS NULL) OR (user_id IS NULL AND role_id IS NOT NULL) OR (user_id IS NOT NULL AND role_id IS NULL))
CHECK (perms_allow >= 0 AND perms_deny >= 0 AND perms_allow <= 9007199254740991 AND perms_deny <= 9007199254740991)
');
$conn->execute('