generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ORV2-3352 Update vehicle type list for TROS and TROW (#1769)
Co-authored-by: John Fletcher <[email protected]>
- Loading branch information
1 parent
8f63a2a
commit bcedb64
Showing
3 changed files
with
152 additions
and
1 deletion.
There are no files selected for viewing
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
57 changes: 57 additions & 0 deletions
57
database/mssql/scripts/versions/revert/v_58_ddl_revert.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,57 @@ | ||
SET ANSI_NULLS ON | ||
GO | ||
SET QUOTED_IDENTIFIER ON | ||
GO | ||
SET NOCOUNT ON | ||
GO | ||
SET XACT_ABORT ON | ||
GO | ||
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE | ||
GO | ||
BEGIN TRANSACTION | ||
GO | ||
|
||
/*Below delete scripts from ORBC_POWER_UNIT_TYPE and ORBC_TRAILER_TYPE have been commented | ||
due to FK constraints. Execute them manually if needed. */ | ||
/* | ||
DELETE FROM dbo.ORBC_POWER_UNIT_TYPE WHERE POWER_UNIT_TYPE='CRANEAT'; | ||
DELETE FROM dbo.ORBC_POWER_UNIT_TYPE WHERE POWER_UNIT_TYPE='CRANEMB'; | ||
DELETE FROM dbo.ORBC_POWER_UNIT_TYPE WHERE POWER_UNIT_TYPE='FARMTRC'; | ||
DELETE FROM dbo.ORBC_POWER_UNIT_TYPE WHERE POWER_UNIT_TYPE='PICKRTR'; | ||
DELETE FROM dbo.ORBC_POWER_UNIT_TYPE WHERE POWER_UNIT_TYPE='RBTRLDR'; | ||
DELETE FROM dbo.ORBC_POWER_UNIT_TYPE WHERE POWER_UNIT_TYPE='TLSCONV'; | ||
DELETE FROM dbo.ORBC_TRAILER_TYPE WHERE TRAILER_TYPE='FECVYPT'; | ||
DELETE FROM dbo.ORBC_TRAILER_TYPE WHERE TRAILER_TYPE='FEWHLPR'; | ||
DELETE FROM dbo.ORBC_TRAILER_TYPE WHERE TRAILER_TYPE='LOGLGCY'; | ||
*/ | ||
|
||
-- Remove the newly added policy configuration | ||
DELETE FROM [dbo].[ORBC_POLICY_CONFIGURATION] | ||
WHERE POLICY_CONFIGURATION_ID = (SELECT MAX(POLICY_CONFIGURATION_ID) FROM [dbo].[ORBC_POLICY_CONFIGURATION]) | ||
GO | ||
|
||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
DECLARE @VersionDescription VARCHAR(255) | ||
SET @VersionDescription = 'Reverting updates to support new vehicle types for TROS and TROW' | ||
|
||
INSERT [dbo].[ORBC_SYS_VERSION] ([VERSION_ID], [DESCRIPTION], [RELEASE_DATE]) VALUES (57, @VersionDescription, getutcdate()) | ||
GO | ||
|
||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
COMMIT TRANSACTION | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
DECLARE @Success AS BIT | ||
SET @Success = 1 | ||
SET NOEXEC OFF | ||
IF (@Success = 1) PRINT 'The database revert succeeded' | ||
ELSE BEGIN | ||
IF @@TRANCOUNT > 0 ROLLBACK TRANSACTION | ||
PRINT 'The database revert failed' | ||
END | ||
GO |
Large diffs are not rendered by default.
Oops, something went wrong.