Skip to content

Commit

Permalink
Pull request #282: add cascade delete to software tables
Browse files Browse the repository at this point in the history
Merge in WALTZ/waltz from WALTZ/waltz-jws:CTCTOWALTZ-2758-add-cascade-delete-between-software-package-and-version-tables-6644 to db-feature/waltz-6644-software-component-fk-on-cascade-delete

* commit 'a5b818aeb5e26008dec642b1c3183c3796228767':
  add cascade delete to software tables
  • Loading branch information
jessica-woodland-scott-db authored and db-waltz committed Jun 19, 2023
2 parents 8363976 + a5b818a commit 9698f4b
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function controller($q, displayNameService, descriptionService, serviceBroker, i
const involvementPromise = serviceBroker
.loadViewData(
CORE_API.InvolvementStore.findBySelector,
[ options ],
[options],
{force: true})
.then(r => r.data);

Expand Down
57 changes: 57 additions & 0 deletions waltz-schema/src/main/resources/liquibase/db.changelog-1.51.xml
Original file line number Diff line number Diff line change
Expand Up @@ -458,4 +458,61 @@
</addColumn>
</changeSet>


<changeSet id="20230616-6633-1"
author="woodjes">
<comment>6633: add cascade delete between software version and package tables</comment>
<dropForeignKeyConstraint baseTableName="software_version"
constraintName="soft_version_package_spid_fk"/>
<addForeignKeyConstraint baseTableName="software_version"
baseColumnNames="software_package_id"
constraintName="soft_version_package_spid_fk"
referencedTableName="software_package"
referencedColumnNames="id"
onDelete="CASCADE"/>
</changeSet>

<changeSet id="20230616-6633-2"
author="woodjes">
<comment>6633: add cascade delete between software version and package tables</comment>
<dropForeignKeyConstraint baseTableName="software_usage"
constraintName="soft_usage_version_fk"/>
<addForeignKeyConstraint baseTableName="software_usage"
baseColumnNames="software_version_id"
constraintName="soft_usage_version_fk"
referencedTableName="software_version"
referencedColumnNames="id"
onDelete="CASCADE"/>
</changeSet>

<changeSet id="20230616-6633-3"
author="woodjes">
<comment>6633: add cascade delete between software version and package tables</comment>

<dropForeignKeyConstraint baseTableName="software_version_licence"
constraintName="svl_licence_fk"/>

<addForeignKeyConstraint baseTableName="software_version_licence"
baseColumnNames="licence_id"
constraintName="svl_licence_fk"
referencedTableName="licence"
referencedColumnNames="id"
onDelete="CASCADE"/>
</changeSet>

<changeSet id="20230616-6633-4"
author="woodjes">
<comment>6633: add cascade delete between software version and package tables</comment>
<dropForeignKeyConstraint baseTableName="software_version_licence"
constraintName="svl_version_fk"/>

<addForeignKeyConstraint baseTableName="software_version_licence"
baseColumnNames="software_version_id"
constraintName="svl_version_fk"
referencedTableName="software_version"
referencedColumnNames="id"
onDelete="CASCADE"/>
</changeSet>


</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,5 @@ private Boolean updateEntityInvolvement(Request request) throws java.io.IOExcept
+ command.operation() + " is not supported");
}
}

}

0 comments on commit 9698f4b

Please sign in to comment.