diff options
author | 2023-03-03 08:53:56 +0000 | |
---|---|---|
committer | 2023-04-14 16:17:33 +0000 | |
commit | 546c144518fae01ecad966149c2930655ac44c2a (patch) | |
tree | 16d53d88071b3cfcf615f7cb2c41acaaae443604 /cps-ri/src/main/resources/changelog/db/changes/18-cascade-delete-fragment-children.yaml | |
parent | fb5f5c24db5c9fefa40a6d489ab533d3ad2b602f (diff) |
Use cascade delete in fragments table
- Add Liquibase change to cascade delete fragments
- Remove cascade delete logic from FragmentNativeRepository
- Remove unused method deleteFragmentEntity
Issue-ID: CPS-1617
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Iecf4f3022b402e0328609ddc11a879c83e5d7f30
Diffstat (limited to 'cps-ri/src/main/resources/changelog/db/changes/18-cascade-delete-fragment-children.yaml')
-rw-r--r-- | cps-ri/src/main/resources/changelog/db/changes/18-cascade-delete-fragment-children.yaml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/cps-ri/src/main/resources/changelog/db/changes/18-cascade-delete-fragment-children.yaml b/cps-ri/src/main/resources/changelog/db/changes/18-cascade-delete-fragment-children.yaml new file mode 100644 index 000000000..62a9e2f63 --- /dev/null +++ b/cps-ri/src/main/resources/changelog/db/changes/18-cascade-delete-fragment-children.yaml @@ -0,0 +1,34 @@ +databaseChangeLog: + - changeSet: + author: cps + id: 18 + changes: + - dropForeignKeyConstraint: + baseTableName: fragment + constraintName: fragment_parent_id_fkey + - addForeignKeyConstraint: + baseColumnNames: parent_id + baseTableName: fragment + constraintName: fragment_parent_id_fkey + deferrable: false + initiallyDeferred: false + onDelete: CASCADE + onUpdate: NO ACTION + referencedColumnNames: id + referencedTableName: fragment + validate: true + rollback: + - dropForeignKeyConstraint: + baseTableName: fragment + constraintName: fragment_parent_id_fkey + - addForeignKeyConstraint: + baseColumnNames: parent_id + baseTableName: fragment + constraintName: fragment_parent_id_fkey + deferrable: false + initiallyDeferred: false + onDelete: NO ACTION + onUpdate: NO ACTION + referencedColumnNames: id + referencedTableName: fragment + validate: true |