Skip to content

Commit 24e5cbd

Browse files
committed
Add DDL and revert scripts to update policy config to include fee calculation for return trip
1 parent 3f70df9 commit 24e5cbd

File tree

3 files changed

+93
-1
lines changed

3 files changed

+93
-1
lines changed

database/mssql/scripts/versions/revert/v_89_ddl_revert.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ IF @@ERROR <> 0 SET NOEXEC ON
2020
GO
2121

2222
DECLARE @VersionDescription VARCHAR(255)
23-
SET @VersionDescription = 'Reverting updates to power unit types table policy config to update vehicle subtype name for Buses'
23+
SET @VersionDescription = 'Reverting updates to policy config to support Commercial Passenger Vehicle conditional licensing fee type'
2424

2525
INSERT [dbo].[ORBC_SYS_VERSION] ([VERSION_ID], [DESCRIPTION], [RELEASE_DATE]) VALUES (88, @VersionDescription, getutcdate())
2626
GO
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
SET ANSI_NULLS ON
2+
GO
3+
SET QUOTED_IDENTIFIER ON
4+
GO
5+
SET NOCOUNT ON
6+
GO
7+
SET XACT_ABORT ON
8+
GO
9+
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
10+
GO
11+
BEGIN TRANSACTION
12+
GO
13+
14+
-- Remove the newly added policy configuration
15+
DELETE FROM [dbo].[ORBC_POLICY_CONFIGURATION]
16+
WHERE POLICY_CONFIGURATION_ID = (SELECT MAX(POLICY_CONFIGURATION_ID) FROM [dbo].[ORBC_POLICY_CONFIGURATION])
17+
GO
18+
19+
IF @@ERROR <> 0 SET NOEXEC ON
20+
GO
21+
22+
DECLARE @VersionDescription VARCHAR(255)
23+
SET @VersionDescription = 'Reverting Updates to policy config to support return trip for STOS and STOW'
24+
25+
INSERT [dbo].[ORBC_SYS_VERSION] ([VERSION_ID], [DESCRIPTION], [RELEASE_DATE]) VALUES (89, @VersionDescription, getutcdate())
26+
GO
27+
28+
IF @@ERROR <> 0 SET NOEXEC ON
29+
GO
30+
31+
COMMIT TRANSACTION
32+
GO
33+
IF @@ERROR <> 0 SET NOEXEC ON
34+
GO
35+
DECLARE @Success AS BIT
36+
SET @Success = 1
37+
SET NOEXEC OFF
38+
IF (@Success = 1) PRINT 'The database revert succeeded'
39+
ELSE BEGIN
40+
IF @@TRANCOUNT > 0 ROLLBACK TRANSACTION
41+
PRINT 'The database revert failed'
42+
END
43+
GO

database/mssql/scripts/versions/v_90_ddl.sql

Lines changed: 49 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)