Skip to content

Commit 2dd2296

Browse files
authored
Delete entries in map_layout_entity table (#76)
Keep table for future usages. Signed-off-by: sBouzols <[email protected]>
1 parent 3e3c4fc commit 2dd2296

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
2+
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:pro="http://www.liquibase.org/xml/ns/pro" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
3+
<!-- Remove foreign key constraint -->
4+
<changeSet author="bouzolssyl (generated)" id="1758788507351-1">
5+
<dropForeignKeyConstraint baseTableName="map_layout_entity" constraintName="fk_map_layout_abstract"/>
6+
</changeSet>
7+
<changeSet author="bouzolssyl (generated)" id="1758788507351-2">
8+
<delete tableName="abstract_diagram_layout_entity_diagram_positions">
9+
<where>abstract_diagram_layout_entity_id IN (SELECT id from map_layout_entity)</where>
10+
</delete>
11+
<delete tableName="abstract_diagram_layout_entity">
12+
<where>id IN (SELECT id from map_layout_entity)</where>
13+
</delete>
14+
<delete tableName="map_layout_entity"/>
15+
</changeSet>
16+
<!-- Restore foreign key constraint -->
17+
<changeSet author="bouzolssyl (generated)" id="1758788507351-3">
18+
<addForeignKeyConstraint baseColumnNames="id" baseTableName="map_layout_entity" constraintName="fk_map_layout_abstract" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="abstract_diagram_layout_entity" validate="true"/>
19+
</changeSet>
20+
</databaseChangeLog>

src/main/resources/db/changelog/db.changelog-master.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,7 @@ databaseChangeLog:
7373
relativeToChangelogFile: true
7474
- include:
7575
file: changesets/changelog_20250905T114211Z.xml
76-
relativeToChangelogFile: true
76+
relativeToChangelogFile: true
77+
- include:
78+
file: changesets/changelog_20250925T082126Z.xml
79+
relativeToChangelogFile: true

0 commit comments

Comments
 (0)