mirror of
https://github.com/verdigado/organization_folders.git
synced 2024-11-21 20:28:11 +01:00
added db constraint to ensure resource members are unique
This commit is contained in:
parent
f652b13dd3
commit
5500ded3fb
1 changed files with 1 additions and 0 deletions
|
@ -67,6 +67,7 @@ class Version000000Date20241025120000 extends SimpleMigrationStep {
|
||||||
['onDelete' => 'CASCADE'],
|
['onDelete' => 'CASCADE'],
|
||||||
'organizationfolders_resource_members_resource_id_fk');
|
'organizationfolders_resource_members_resource_id_fk');
|
||||||
$table->addIndex(['resource_id'], 'organizationfolders_resource_members_resource_id_index');
|
$table->addIndex(['resource_id'], 'organizationfolders_resource_members_resource_id_index');
|
||||||
|
$table->addUniqueConstraint(['resource_id', 'type', 'principal'], "organizationfolders_resource_members_unique");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $schema;
|
return $schema;
|
||||||
|
|
Loading…
Reference in a new issue