0
0
Fork 0
mirror of https://github.com/verdigado/organization_folders.git synced 2024-11-24 13:40:27 +01:00

added db constraint to ensure resource members are unique

This commit is contained in:
Jonathan Treffler 2024-11-04 20:02:21 +01:00
parent f652b13dd3
commit 5500ded3fb

View file

@ -67,6 +67,7 @@ class Version000000Date20241025120000 extends SimpleMigrationStep {
['onDelete' => 'CASCADE'],
'organizationfolders_resource_members_resource_id_fk');
$table->addIndex(['resource_id'], 'organizationfolders_resource_members_resource_id_index');
$table->addUniqueConstraint(['resource_id', 'type', 'principal'], "organizationfolders_resource_members_unique");
}
return $schema;