Skip to content

Commit

Permalink
ORV2-3352 Update vehicle type list for TROS and TROW (#1769)
Browse files Browse the repository at this point in the history
Co-authored-by: John Fletcher <[email protected]>
  • Loading branch information
praju-aot and john-fletcher-aot authored Jan 29, 2025
1 parent 8f63a2a commit bcedb64
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 1 deletion.
8 changes: 7 additions & 1 deletion database/mssql/scripts/versions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,10 @@
- Updates to policy configuration JSON allowing lcv for TROS and TROW

### Version 56:
- Configure the MV4001 external form in OnRouteBC
- Configure the MV4001 external form in OnRouteBC

### Version 57:
- Configure new templates for TROS and TROW

### Version 58:
- Updates to support new vehicle types for TROS and TROW
57 changes: 57 additions & 0 deletions database/mssql/scripts/versions/revert/v_58_ddl_revert.sql
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
88 changes: 88 additions & 0 deletions database/mssql/scripts/versions/v_58_ddl.sql

Large diffs are not rendered by default.

0 comments on commit bcedb64

Please sign in to comment.