Skip to content

Commit 9747513

Browse files
committed
Fixed missing foreign keys [#2178]
1 parent 11e14a1 commit 9747513

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
5+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
6+
<changeSet id="001_2178_add_missing_foreign_keys-1" author="mcpierce">
7+
8+
<preConditions onFail="MARK_RAN">
9+
<not>
10+
<foreignKeyConstraintExists foreignKeyName="comic_page_comic_book_fk"/>
11+
</not>
12+
</preConditions>
13+
14+
<addForeignKeyConstraint baseTableName="comic_pages" baseColumnNames="comic_book_id"
15+
constraintName="comic_pages_comic_book_fk"
16+
referencedTableName="comic_books"
17+
referencedColumnNames="comic_book_id"/>
18+
19+
</changeSet>
20+
21+
<changeSet id="001_2178_add_missing_foreign_keys-2" author="mcpierce">
22+
23+
<preConditions onFail="MARK_RAN">
24+
<not>
25+
<foreignKeyConstraintExists foreignKeyName="reading_list_entry_comic_detail_fk"/>
26+
</not>
27+
</preConditions>
28+
29+
<addForeignKeyConstraint baseTableName="reading_list_entries" baseColumnNames="comic_detail_id"
30+
constraintName="reading_list_entry_comic_detail_fk"
31+
referencedTableName="comic_details"
32+
referencedColumnNames="comic_detail_id"/>
33+
34+
</changeSet>
35+
</databaseChangeLog>

comixed-model/src/main/resources/db/migrations/3.0/changelog-3.0.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<include file="/db/migrations/3.0/create_tables/create_tables_changelog.xml"/>
1414

1515
<!-- create views -->
16-
1716
<include file="/db/migrations/3.0/create_views/create_views_changelog.xml"/>
1817

1918
<!-- v3.0 migrations -->
19+
<include file="/db/migrations/3.0/001_2178_add_missing_foreign_keys.xml"/>
2020

2121
</databaseChangeLog>

0 commit comments

Comments
 (0)