Skip to content

Commit b66e986

Browse files
authored
fix tblPremium CreatedDate
1 parent fb0c460 commit b66e986

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sql/base/1_schema_tables.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,7 @@ CREATE TABLE [dbo].[tblPremium](
19391939
[OverviewCommissionReport] datetime NULL,
19401940
[AllDetailsCommissionReport] datetime NULL,
19411941
[ReportingCommissionID] [int] NULL,
1942-
[CreatedDate] [datetime] NULL CONSTRAINT DF_tblPremium_CreatedDate DEFAULT GETDATE(),
1942+
[CreatedDate] [datetime] NOT NULL DEFAULT GETDATE(),
19431943
[Source] [nvarchar](50) NULL,
19441944
[SourceVersion] [nvarchar](15) NULL
19451945
CONSTRAINT [PK_tblPremium] PRIMARY KEY CLUSTERED

sql/migrations/1_migration_latest.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3188,8 +3188,8 @@ IF OBJECT_ID('FK_tblPaymentDetails_tblPayment') IS NULL
31883188
--OTC-511
31893189
IF COL_LENGTH(N'tblPremium', N'CreatedDate') IS NULL
31903190
ALTER TABLE tblPremium
3191-
ADD [CreatedDate] DATETIME NULL CONSTRAINT DF_tblPremium_CreatedDate DEFAULT GETDATE()
3192-
3191+
ADD [CreatedDate] DATETIME NOT NULL DEFAULT GETDATE()
3192+
UPDATE tblPremium SET CreatedDate = ValidityFrom
31933193
GO
31943194

31953195
--OTC-520

0 commit comments

Comments
 (0)