forked from flowable/flowable-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cmmn + eventregistry SQL drop scripts
- Loading branch information
Showing
11 changed files
with
278 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
...wable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/drop/flowable.db2.drop.cmmn.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
alter table ACT_CMMN_RU_MIL_INST drop foreign key ACT_FK_MIL_CASE_INST; | ||
alter table ACT_CMMN_RU_MIL_INST drop foreign key ACT_FK_MIL_CASE_DEF; | ||
alter table ACT_CMMN_RU_SENTRY_PART_INST drop foreign key ACT_FK_SENTRY_PLAN_ITEM; | ||
alter table ACT_CMMN_RU_SENTRY_PART_INST drop foreign key ACT_FK_SENTRY_CASE_INST; | ||
alter table ACT_CMMN_RU_SENTRY_PART_INST drop foreign key ACT_FK_SENTRY_CASE_DEF; | ||
alter table ACT_CMMN_RU_PLAN_ITEM_INST drop foreign key ACT_FK_PLAN_ITEM_CASE_INST; | ||
alter table ACT_CMMN_RU_PLAN_ITEM_INST drop foreign key ACT_FK_PLAN_ITEM_CASE_DEF; | ||
alter table ACT_CMMN_RU_CASE_INST drop foreign key ACT_FK_CASE_INST_CASE_DEF; | ||
alter table ACT_CMMN_CASEDEF drop foreign key ACT_FK_CASE_DEF_DPLY; | ||
alter table ACT_CMMN_DEPLOYMENT_RESOURCE drop foreign key ACT_FK_CMMN_RSRC_DPL; | ||
|
||
drop index ACT_IDX_HI_PLAN_ITEM_INST_CASE; | ||
drop index ACT_IDX_HI_PLAN_ITEM_INST_CASE; | ||
drop index ACT_IDX_CASE_INST_REF_ID_; | ||
drop index ACT_IDX_CASE_DEF_UNIQ; | ||
drop index ACT_IDX_PLAN_ITEM_STAGE_INST; | ||
drop index ACT_IDX_MIL_CASE_INST; | ||
drop index ACT_IDX_MIL_CASE_DEF; | ||
drop index ACT_IDX_SENTRY_PLAN_ITEM; | ||
drop index ACT_IDX_SENTRY_CASE_INST; | ||
drop index ACT_IDX_SENTRY_CASE_DEF; | ||
drop index ACT_IDX_PLAN_ITEM_CASE_INST; | ||
drop index ACT_IDX_PLAN_ITEM_CASE_DEF; | ||
drop index ACT_IDX_CASE_INST_PARENT; | ||
drop index ACT_IDX_CASE_INST_CASE_DEF; | ||
drop index ACT_IDX_CASE_DEF_DPLY; | ||
drop index ACT_IDX_CMMN_RSRC_DPL; | ||
|
||
drop table ACT_CMMN_HI_PLAN_ITEM_INST; | ||
drop table ACT_CMMN_HI_MIL_INST; | ||
drop table ACT_CMMN_HI_CASE_INST; | ||
drop table ACT_CMMN_RU_MIL_INST; | ||
drop table ACT_CMMN_RU_SENTRY_PART_INST; | ||
drop table ACT_CMMN_RU_PLAN_ITEM_INST; | ||
drop table ACT_CMMN_RU_CASE_INST; | ||
drop table ACT_CMMN_CASEDEF; | ||
drop table ACT_CMMN_DEPLOYMENT_RESOURCE; | ||
drop table ACT_CMMN_DEPLOYMENT; |
27 changes: 27 additions & 0 deletions
27
...owable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/drop/flowable.h2.drop.cmmn.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
drop table if exists ACT_CMMN_HI_PLAN_ITEM_INST cascade constraints; | ||
drop table if exists ACT_CMMN_HI_MIL_INST cascade constraints; | ||
drop table if exists ACT_CMMN_HI_CASE_INST cascade constraints; | ||
drop table if exists ACT_CMMN_RU_MIL_INST cascade constraints; | ||
drop table if exists ACT_CMMN_RU_SENTRY_PART_INST cascade constraints; | ||
drop table if exists ACT_CMMN_RU_PLAN_ITEM_INST cascade constraints; | ||
drop table if exists ACT_CMMN_RU_CASE_INST cascade constraints; | ||
drop table if exists ACT_CMMN_CASEDEF cascade constraints; | ||
drop table if exists ACT_CMMN_DEPLOYMENT_RESOURCE cascade constraints; | ||
drop table if exists ACT_CMMN_DEPLOYMENT cascade constraints; | ||
|
||
drop index if exists ACT_IDX_HI_PLAN_ITEM_INST_CASE; | ||
drop index if exists ACT_IDX_HI_PLAN_ITEM_INST_CASE; | ||
drop index if exists ACT_IDX_CASE_INST_REF_ID_; | ||
drop index if exists ACT_IDX_CASE_DEF_UNIQ; | ||
drop index if exists ACT_IDX_PLAN_ITEM_STAGE_INST; | ||
drop index if exists ACT_IDX_MIL_CASE_INST; | ||
drop index if exists ACT_IDX_MIL_CASE_DEF; | ||
drop index if exists ACT_IDX_SENTRY_PLAN_ITEM; | ||
drop index if exists ACT_IDX_SENTRY_CASE_INST; | ||
drop index if exists ACT_IDX_SENTRY_CASE_DEF; | ||
drop index if exists ACT_IDX_PLAN_ITEM_CASE_INST; | ||
drop index if exists ACT_IDX_PLAN_ITEM_CASE_DEF; | ||
drop index if exists ACT_IDX_CASE_INST_PARENT; | ||
drop index if exists ACT_IDX_CASE_INST_CASE_DEF; | ||
drop index if exists ACT_IDX_CASE_DEF_DPLY; | ||
drop index if exists ACT_IDX_CMMN_RSRC_DPL; |
27 changes: 27 additions & 0 deletions
27
...able-cmmn-engine/src/main/resources/org/flowable/cmmn/db/drop/flowable.hsql.drop.cmmn.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
drop table if exists ACT_CMMN_HI_PLAN_ITEM_INST cascade constraints; | ||
drop table if exists ACT_CMMN_HI_MIL_INST cascade constraints; | ||
drop table if exists ACT_CMMN_HI_CASE_INST cascade constraints; | ||
drop table if exists ACT_CMMN_RU_MIL_INST cascade constraints; | ||
drop table if exists ACT_CMMN_RU_SENTRY_PART_INST cascade constraints; | ||
drop table if exists ACT_CMMN_RU_PLAN_ITEM_INST cascade constraints; | ||
drop table if exists ACT_CMMN_RU_CASE_INST cascade constraints; | ||
drop table if exists ACT_CMMN_CASEDEF cascade constraints; | ||
drop table if exists ACT_CMMN_DEPLOYMENT_RESOURCE cascade constraints; | ||
drop table if exists ACT_CMMN_DEPLOYMENT cascade constraints; | ||
|
||
drop index if exists ACT_IDX_HI_PLAN_ITEM_INST_CASE; | ||
drop index if exists ACT_IDX_HI_PLAN_ITEM_INST_CASE; | ||
drop index if exists ACT_IDX_CASE_INST_REF_ID_; | ||
drop index if exists ACT_IDX_CASE_DEF_UNIQ; | ||
drop index if exists ACT_IDX_PLAN_ITEM_STAGE_INST; | ||
drop index if exists ACT_IDX_MIL_CASE_INST; | ||
drop index if exists ACT_IDX_MIL_CASE_DEF; | ||
drop index if exists ACT_IDX_SENTRY_PLAN_ITEM; | ||
drop index if exists ACT_IDX_SENTRY_CASE_INST; | ||
drop index if exists ACT_IDX_SENTRY_CASE_DEF; | ||
drop index if exists ACT_IDX_PLAN_ITEM_CASE_INST; | ||
drop index if exists ACT_IDX_PLAN_ITEM_CASE_DEF; | ||
drop index if exists ACT_IDX_CASE_INST_PARENT; | ||
drop index if exists ACT_IDX_CASE_INST_CASE_DEF; | ||
drop index if exists ACT_IDX_CASE_DEF_DPLY; | ||
drop index if exists ACT_IDX_CMMN_RSRC_DPL; |
38 changes: 38 additions & 0 deletions
38
...ble-cmmn-engine/src/main/resources/org/flowable/cmmn/db/drop/flowable.mssql.drop.cmmn.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_HI_PLAN_ITEM_INST_CASE') drop index ACT_CMMN_HI_PLAN_ITEM_INST.ACT_IDX_HI_PLAN_ITEM_INST_CASE; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_HI_PLAN_ITEM_INST_CASE') drop index ACT_CMMN_HI_PLAN_ITEM_INST.ACT_IDX_HI_PLAN_ITEM_INST_CASE; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_CASE_INST_REF_ID_') drop index ACT_CMMN_RU_CASE_INST.ACT_IDX_CASE_INST_REF_ID_; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_CASE_DEF_UNIQ') drop index ACT_CMMN_CASEDEF.ACT_IDX_CASE_DEF_UNIQ; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_PLAN_ITEM_STAGE_INST') drop index ACT_CMMN_RU_PLAN_ITEM_INST.ACT_IDX_PLAN_ITEM_STAGE_INST; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_MIL_CASE_INST') drop index ACT_CMMN_RU_MIL_INST.ACT_IDX_MIL_CASE_INST; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_MIL_CASE_DEF') drop index ACT_CMMN_RU_MIL_INST.ACT_IDX_MIL_CASE_DEF; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_SENTRY_PLAN_ITEM') drop index ACT_CMMN_RU_SENTRY_PART_INST.ACT_IDX_SENTRY_PLAN_ITEM; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_SENTRY_CASE_INST') drop index ACT_CMMN_RU_SENTRY_PART_INST.ACT_IDX_SENTRY_CASE_INST; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_SENTRY_CASE_DEF') drop index ACT_CMMN_RU_SENTRY_PART_INST.ACT_IDX_SENTRY_CASE_DEF; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_PLAN_ITEM_CASE_INST') drop index ACT_CMMN_RU_PLAN_ITEM_INST.ACT_IDX_PLAN_ITEM_CASE_INST; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_PLAN_ITEM_CASE_DEF') drop index ACT_CMMN_RU_PLAN_ITEM_INST.ACT_IDX_PLAN_ITEM_CASE_DEF; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_CASE_INST_PARENT') drop index ACT_CMMN_RU_CASE_INST.ACT_IDX_CASE_INST_PARENT; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_CASE_INST_CASE_DEF') drop index ACT_CMMN_RU_CASE_INST.ACT_IDX_CASE_INST_CASE_DEF; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_CASE_DEF_DPLY') drop index ACT_CMMN_CASEDEF.ACT_IDX_CASE_DEF_DPLY; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_CMMN_RSRC_DPL') drop index ACT_CMMN_DEPLOYMENT_RESOURCE.ACT_IDX_CMMN_RSRC_DPL; | ||
|
||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_RU_MIL_INST') alter table ACT_CMMN_RU_MIL_INST drop constraint ACT_FK_MIL_CASE_INST; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_RU_MIL_INST') alter table ACT_CMMN_RU_MIL_INST drop constraint ACT_FK_MIL_CASE_DEF; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_RU_SENTRY_PART_INST') alter table ACT_CMMN_RU_SENTRY_PART_INST drop constraint ACT_FK_SENTRY_PLAN_ITEM; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_RU_SENTRY_PART_INST') alter table ACT_CMMN_RU_SENTRY_PART_INST drop constraint ACT_FK_SENTRY_CASE_INST; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_RU_SENTRY_PART_INST') alter table ACT_CMMN_RU_SENTRY_PART_INST drop constraint ACT_FK_SENTRY_CASE_DEF; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_RU_PLAN_ITEM_INST') alter table ACT_CMMN_RU_PLAN_ITEM_INST drop constraint ACT_FK_PLAN_ITEM_CASE_INST; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_RU_PLAN_ITEM_INST') alter table ACT_CMMN_RU_PLAN_ITEM_INST drop constraint ACT_FK_PLAN_ITEM_CASE_DEF; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_RU_CASE_INST') alter table ACT_CMMN_RU_CASE_INST drop constraint ACT_FK_CASE_INST_CASE_DEF; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_CASEDEF') alter table ACT_CMMN_CASEDEF drop constraint ACT_FK_CASE_DEF_DPLY; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_DEPLOYMENT_RESOURCE') alter table ACT_CMMN_DEPLOYMENT_RESOURCE drop constraint ACT_FK_CMMN_RSRC_DPL; | ||
|
||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_HI_PLAN_ITEM_INST') drop table ACT_CMMN_HI_PLAN_ITEM_INST; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_HI_MIL_INST') drop table ACT_CMMN_HI_MIL_INST; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_HI_CASE_INST') drop table ACT_CMMN_HI_CASE_INST; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_RU_MIL_INST') drop table ACT_CMMN_RU_MIL_INST; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_RU_SENTRY_PART_INST') drop table ACT_CMMN_RU_SENTRY_PART_INST; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_RU_PLAN_ITEM_INST') drop table ACT_CMMN_RU_PLAN_ITEM_INST; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_RU_CASE_INST') drop table ACT_CMMN_RU_CASE_INST; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_CASEDEF') drop table ACT_CMMN_CASEDEF; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_DEPLOYMENT_RESOURCE') drop table ACT_CMMN_DEPLOYMENT_RESOURCE; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_CMMN_DEPLOYMENT') drop table ACT_CMMN_DEPLOYMENT; |
38 changes: 38 additions & 0 deletions
38
...ble-cmmn-engine/src/main/resources/org/flowable/cmmn/db/drop/flowable.mysql.drop.cmmn.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
alter table ACT_CMMN_RU_MIL_INST drop foreign key ACT_FK_MIL_CASE_INST; | ||
alter table ACT_CMMN_RU_MIL_INST drop foreign key ACT_FK_MIL_CASE_DEF; | ||
alter table ACT_CMMN_RU_SENTRY_PART_INST drop foreign key ACT_FK_SENTRY_PLAN_ITEM; | ||
alter table ACT_CMMN_RU_SENTRY_PART_INST drop foreign key ACT_FK_SENTRY_CASE_INST; | ||
alter table ACT_CMMN_RU_SENTRY_PART_INST drop foreign key ACT_FK_SENTRY_CASE_DEF; | ||
alter table ACT_CMMN_RU_PLAN_ITEM_INST drop foreign key ACT_FK_PLAN_ITEM_CASE_INST; | ||
alter table ACT_CMMN_RU_PLAN_ITEM_INST drop foreign key ACT_FK_PLAN_ITEM_CASE_DEF; | ||
alter table ACT_CMMN_RU_CASE_INST drop foreign key ACT_FK_CASE_INST_CASE_DEF; | ||
alter table ACT_CMMN_CASEDEF drop foreign key ACT_FK_CASE_DEF_DPLY; | ||
alter table ACT_CMMN_DEPLOYMENT_RESOURCE drop foreign key ACT_FK_CMMN_RSRC_DPL; | ||
|
||
drop index ACT_IDX_HI_PLAN_ITEM_INST_CASE on ACT_CMMN_HI_PLAN_ITEM_INST; | ||
drop index ACT_IDX_HI_PLAN_ITEM_INST_CASE on ACT_CMMN_HI_PLAN_ITEM_INST; | ||
drop index ACT_IDX_CASE_INST_REF_ID_ on ACT_CMMN_RU_CASE_INST; | ||
drop index ACT_IDX_CASE_DEF_UNIQ on ACT_CMMN_CASEDEF; | ||
drop index ACT_IDX_PLAN_ITEM_STAGE_INST on ACT_CMMN_RU_PLAN_ITEM_INST; | ||
drop index ACT_IDX_MIL_CASE_INST on ACT_CMMN_RU_MIL_INST; | ||
drop index ACT_IDX_MIL_CASE_DEF on ACT_CMMN_RU_MIL_INST; | ||
drop index ACT_IDX_SENTRY_PLAN_ITEM on ACT_CMMN_RU_SENTRY_PART_INST; | ||
drop index ACT_IDX_SENTRY_CASE_INST on ACT_CMMN_RU_SENTRY_PART_INST; | ||
drop index ACT_IDX_SENTRY_CASE_DEF on ACT_CMMN_RU_SENTRY_PART_INST; | ||
drop index ACT_IDX_PLAN_ITEM_CASE_INST on ACT_CMMN_RU_PLAN_ITEM_INST; | ||
drop index ACT_IDX_PLAN_ITEM_CASE_DEF on ACT_CMMN_RU_PLAN_ITEM_INST; | ||
drop index ACT_IDX_CASE_INST_PARENT on ACT_CMMN_RU_CASE_INST; | ||
drop index ACT_IDX_CASE_INST_CASE_DEF on ACT_CMMN_RU_CASE_INST; | ||
drop index ACT_IDX_CASE_DEF_DPLY on ACT_CMMN_CASEDEF; | ||
drop index ACT_IDX_CMMN_RSRC_DPL on ACT_CMMN_DEPLOYMENT_RESOURCE; | ||
|
||
drop table if exists ACT_CMMN_HI_PLAN_ITEM_INST; | ||
drop table if exists ACT_CMMN_HI_MIL_INST; | ||
drop table if exists ACT_CMMN_HI_CASE_INST; | ||
drop table if exists ACT_CMMN_RU_MIL_INST; | ||
drop table if exists ACT_CMMN_RU_SENTRY_PART_INST; | ||
drop table if exists ACT_CMMN_RU_PLAN_ITEM_INST; | ||
drop table if exists ACT_CMMN_RU_CASE_INST; | ||
drop table if exists ACT_CMMN_CASEDEF; | ||
drop table if exists ACT_CMMN_DEPLOYMENT_RESOURCE; | ||
drop table if exists ACT_CMMN_DEPLOYMENT; |
38 changes: 38 additions & 0 deletions
38
...le-cmmn-engine/src/main/resources/org/flowable/cmmn/db/drop/flowable.oracle.drop.cmmn.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
alter table ACT_CMMN_RU_MIL_INST drop constraint ACT_FK_MIL_CASE_INST; | ||
alter table ACT_CMMN_RU_MIL_INST drop constraint ACT_FK_MIL_CASE_DEF; | ||
alter table ACT_CMMN_RU_SENTRY_PART_INST drop constraint ACT_FK_SENTRY_PLAN_ITEM; | ||
alter table ACT_CMMN_RU_SENTRY_PART_INST drop constraint ACT_FK_SENTRY_CASE_INST; | ||
alter table ACT_CMMN_RU_SENTRY_PART_INST drop constraint ACT_FK_SENTRY_CASE_DEF; | ||
alter table ACT_CMMN_RU_PLAN_ITEM_INST drop constraint ACT_FK_PLAN_ITEM_CASE_INST; | ||
alter table ACT_CMMN_RU_PLAN_ITEM_INST drop constraint ACT_FK_PLAN_ITEM_CASE_DEF; | ||
alter table ACT_CMMN_RU_CASE_INST drop constraint ACT_FK_CASE_INST_CASE_DEF; | ||
alter table ACT_CMMN_CASEDEF drop constraint ACT_FK_CASE_DEF_DPLY; | ||
alter table ACT_CMMN_DEPLOYMENT_RESOURCE drop constraint ACT_FK_CMMN_RSRC_DPL; | ||
|
||
drop index ACT_IDX_HI_PLAN_ITEM_INST_CASE; | ||
drop index ACT_IDX_HI_PLAN_ITEM_INST_CASE; | ||
drop index ACT_IDX_CASE_INST_REF_ID_; | ||
drop index ACT_IDX_CASE_DEF_UNIQ; | ||
drop index ACT_IDX_PLAN_ITEM_STAGE_INST; | ||
drop index ACT_IDX_MIL_CASE_INST; | ||
drop index ACT_IDX_MIL_CASE_DEF; | ||
drop index ACT_IDX_SENTRY_PLAN_ITEM; | ||
drop index ACT_IDX_SENTRY_CASE_INST; | ||
drop index ACT_IDX_SENTRY_CASE_DEF; | ||
drop index ACT_IDX_PLAN_ITEM_CASE_INST; | ||
drop index ACT_IDX_PLAN_ITEM_CASE_DEF; | ||
drop index ACT_IDX_CASE_INST_PARENT; | ||
drop index ACT_IDX_CASE_INST_CASE_DEF; | ||
drop index ACT_IDX_CASE_DEF_DPLY; | ||
drop index ACT_IDX_CMMN_RSRC_DPL; | ||
|
||
drop table ACT_CMMN_HI_PLAN_ITEM_INST; | ||
drop table ACT_CMMN_HI_MIL_INST; | ||
drop table ACT_CMMN_HI_CASE_INST; | ||
drop table ACT_CMMN_RU_MIL_INST; | ||
drop table ACT_CMMN_RU_SENTRY_PART_INST; | ||
drop table ACT_CMMN_RU_PLAN_ITEM_INST; | ||
drop table ACT_CMMN_RU_CASE_INST; | ||
drop table ACT_CMMN_CASEDEF; | ||
drop table ACT_CMMN_DEPLOYMENT_RESOURCE; | ||
drop table ACT_CMMN_DEPLOYMENT; |
10 changes: 10 additions & 0 deletions
10
...-cmmn-engine/src/main/resources/org/flowable/cmmn/db/drop/flowable.postgres.drop.cmmn.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
drop table ACT_CMMN_HI_PLAN_ITEM_INST cascade; | ||
drop table ACT_CMMN_HI_MIL_INST cascade; | ||
drop table ACT_CMMN_HI_CASE_INST cascade; | ||
drop table ACT_CMMN_RU_MIL_INST cascade; | ||
drop table ACT_CMMN_RU_SENTRY_PART_INST cascade; | ||
drop table ACT_CMMN_RU_PLAN_ITEM_INST cascade; | ||
drop table ACT_CMMN_RU_CASE_INST cascade; | ||
drop table ACT_CMMN_CASEDEF cascade; | ||
drop table ACT_CMMN_DEPLOYMENT_RESOURCE cascade; | ||
drop table ACT_CMMN_DEPLOYMENT cascade; |
41 changes: 41 additions & 0 deletions
41
...owable-cmmn-engine/src/test/java/org/flowable/cmmn/test/db/CmmnEngineDropScriptsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.flowable.cmmn.test.db; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.flowable.cmmn.engine.test.FlowableCmmnTestCase; | ||
import org.flowable.common.engine.impl.db.SchemaManager; | ||
import org.flowable.common.engine.impl.db.SchemaOperationsEngineBuild; | ||
import org.flowable.common.engine.impl.db.SchemaOperationsEngineDropDbCmd; | ||
import org.junit.Test; | ||
|
||
/** | ||
* @author Joram Barrez | ||
*/ | ||
public class CmmnEngineDropScriptsTest extends FlowableCmmnTestCase { | ||
|
||
@Test | ||
public void testDropSchema() { | ||
|
||
// Dropping and recreating the schema should not have an impact on other tests | ||
SchemaManager schemaManager = cmmnEngineConfiguration.getSchemaManager(); | ||
cmmnEngineConfiguration.getCommandExecutor().execute(new SchemaOperationsEngineDropDbCmd(cmmnEngineConfiguration.getEngineScopeType())); | ||
assertThat(cmmnEngineConfiguration.getCmmnManagementService().getTableCounts(). | ||
keySet().stream().filter(tableName -> tableName.toLowerCase().startsWith("act_cmmn"))).hasSize(0); | ||
|
||
cmmnEngineConfiguration.getCommandExecutor().execute(new SchemaOperationsEngineBuild(cmmnEngineConfiguration.getEngineScopeType())); | ||
assertThat(cmmnEngineConfiguration.getCmmnManagementService().getTableCounts(). | ||
keySet().stream().filter(tableName -> tableName.toLowerCase().startsWith("act_cmmn"))).hasSize(10); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...src/main/resources/org/flowable/eventregistry/db/drop/flowable.db2.drop.eventregistry.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
drop index ACT_IDX_CHANNEL_DEF_UNIQ; | ||
drop index ACT_IDX_EVENT_DEF_UNIQ; | ||
|
||
drop table FLW_CHANNEL_DEFINITION; | ||
drop table FLW_EVENT_DEFINITION; | ||
drop table FLW_EVENT_RESOURCE; | ||
drop table FLW_EVENT_DEPLOYMENT; |
7 changes: 7 additions & 0 deletions
7
...c/main/resources/org/flowable/eventregistry/db/drop/flowable.mssql.drop.eventregistry.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_CHANNEL_DEF_UNIQ') drop index FLW_CHANNEL_DEFINITION.ACT_IDX_CHANNEL_DEF_UNIQ; | ||
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EVENT_DEF_UNIQ') drop index FLW_EVENT_DEFINITION.ACT_IDX_EVENT_DEF_UNIQ; | ||
|
||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'FLW_CHANNEL_DEFINITION') drop table FLW_CHANNEL_DEFINITION; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'FLW_EVENT_DEFINITION') drop table FLW_EVENT_DEFINITION; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'FLW_EVENT_RESOURCE') drop table FLW_EVENT_RESOURCE; | ||
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'FLW_EVENT_DEPLOYMENT') drop table FLW_EVENT_DEPLOYMENT; |
7 changes: 7 additions & 0 deletions
7
.../main/resources/org/flowable/eventregistry/db/drop/flowable.oracle.drop.eventregistry.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
drop index ACT_IDX_CHANNEL_DEF_UNIQ; | ||
drop index ACT_IDX_EVENT_DEF_UNIQ; | ||
|
||
drop table FLW_CHANNEL_DEFINITION; | ||
drop table FLW_EVENT_DEFINITION; | ||
drop table FLW_EVENT_RESOURCE; | ||
drop table FLW_EVENT_DEPLOYMENT; |