Skip to content

Commit e3bed97

Browse files
authored
Merge pull request #6468 from slub/add_missing_fk_relation
Add missing foreign key relations
2 parents 30816f2 + 8c0d0ed commit e3bed97

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
--
2+
-- (c) Kitodo. Key to digital objects e. V. <contact@kitodo.org>
3+
--
4+
-- This file is part of the Kitodo project.
5+
--
6+
-- It is licensed under GNU General Public License version 3 or later.
7+
--
8+
-- For the full copyright and license information, please read the
9+
-- GPL3-License.txt file that was distributed with this source code.
10+
--
11+
12+
SET SQL_SAFE_UPDATES = 0;
13+
14+
-- importconfiguration table
15+
ALTER TABLE importconfiguration ADD KEY FK_importconfiguration_searchfield_id(default_searchfield_id);
16+
ALTER TABLE importconfiguration ADD CONSTRAINT FK_importconfiguration_searchfield_id FOREIGN KEY (default_searchfield_id) REFERENCES searchfield(id);
17+
18+
ALTER TABLE importconfiguration ADD KEY FK_importconfiguration_searchfield_identifier_id(identifier_searchfield_id);
19+
ALTER TABLE importconfiguration ADD CONSTRAINT FK_importconfiguration_searchfield_identifier_id FOREIGN KEY (identifier_searchfield_id) REFERENCES searchfield(id);
20+
21+
ALTER TABLE importconfiguration ADD KEY FK_importconfiguration_searchfield_parent_searchfield_id(parent_searchfield_id);
22+
ALTER TABLE importconfiguration ADD CONSTRAINT FK_importconfiguration_searchfield_parent_searchfield_id FOREIGN KEY (parent_searchfield_id) REFERENCES searchfield(id);
23+
24+
-- process table
25+
ALTER TABLE process ADD KEY FK_process_import_configuration_id(import_configuration_id);
26+
ALTER TABLE process ADD CONSTRAINT FK_process_import_configuration_id FOREIGN KEY (import_configuration_id) REFERENCES importconfiguration (id);
27+
28+
-- user table
29+
ALTER TABLE user ADD KEY FK_user_default_client_id(default_client_id);
30+
ALTER TABLE user ADD CONSTRAINT FK_user_default_client_id FOREIGN KEY (default_client_id) REFERENCES client(id);
31+
32+
SET SQL_SAFE_UPDATES = 1;

0 commit comments

Comments
 (0)