Skip to content

Commit

Permalink
ORV2-3163 Rectify the revert script to avoid errors on revert or reset (
Browse files Browse the repository at this point in the history
  • Loading branch information
praju-aot authored Dec 5, 2024
1 parent 745498c commit 0ba2c14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion database/mssql/scripts/versions/revert/v_39_ddl_revert.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ BEGIN TRY
ALTER TABLE [permit].[ORBC_NO_FEE_TYPE] DROP CONSTRAINT [DF_ORBC_NO_FEE_TYPE_DB_CREATE_TIMESTAMP]
ALTER TABLE [permit].[ORBC_NO_FEE_TYPE] DROP CONSTRAINT [DF_ORBC_NO_FEE_TYPE_DB_LAST_UPDATE_USERID]
ALTER TABLE [permit].[ORBC_NO_FEE_TYPE] DROP CONSTRAINT [DF_ORBC_NO_FEE_TYPE_DB_LAST_UPDATE_TIMESTAMP]
ALTER TABLE [permit].[ORBC_SPECIAL_AUTH_HIST] ALTER COLUMN NO_FEE_TYPE VARCHAR(12) NOT NULL
-- History table should not have any constraints
-- ALTER TABLE [permit].[ORBC_SPECIAL_AUTH_HIST] ALTER COLUMN NO_FEE_TYPE VARCHAR(12) NOT NULL
COMMIT
END TRY

Expand Down
3 changes: 2 additions & 1 deletion database/mssql/scripts/versions/revert/v_42_ddl_revert.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ BEGIN TRY
DROP TABLE [case].[ORBC_CASE_TYPE]
DROP TABLE [case].[ORBC_CASE_STATUS_TYPE]
DROP SCHEMA [case]
DELETE FROM [permit].[ORBC_PERMIT_STATUS_TYPE] WHERE [PERMIT_STATUS_TYPE] ='IN_QUEUE'
-- Commenting the below line to Avoid FK constraints while running moti-reset-db.sh
-- DELETE FROM [permit].[ORBC_PERMIT_STATUS_TYPE] WHERE [PERMIT_STATUS_TYPE] ='IN_QUEUE'
COMMIT
END TRY

Expand Down

0 comments on commit 0ba2c14

Please sign in to comment.