0
0
Fork 0
mirror of https://github.com/verdigado/organization_folders.git synced 2024-12-06 11:22:41 +01:00

save fileId for folder resources

This commit is contained in:
Jonathan Treffler 2024-10-31 17:51:20 +01:00
parent 92c431e856
commit 82d95da322
3 changed files with 9 additions and 1 deletions

View file

@ -89,6 +89,9 @@ class Version000000Date20241014120000 extends SimpleMigrationStep {
'length' => 11,
'notnull' => true,
]);
$table->addColumn('file_id', Types::INTEGER, [
'notnull' => true,
]);
$table->setPrimaryKey(['resource_id']);
$table->addForeignKeyConstraint(
@ -97,6 +100,7 @@ class Version000000Date20241014120000 extends SimpleMigrationStep {
['id'],
['onDelete' => 'CASCADE'],
'organizationfolders_folder_resources_resource_id_fk');
$table->addIndex(['file_id'], 'organizationfolders_folder_resources_file_id_index');
}
return $schema;