diff --git a/DBPatch/sqlScripts/SystemX.DB.UniqueKeyDB_Create.sql b/DBPatch/sqlScripts/SystemX.DB.UniqueKeyDB_Create.sql index 16a77b7..7b89f16 100644 --- a/DBPatch/sqlScripts/SystemX.DB.UniqueKeyDB_Create.sql +++ b/DBPatch/sqlScripts/SystemX.DB.UniqueKeyDB_Create.sql @@ -266,7 +266,7 @@ PRINT N'테이블 [dbo].[tPairKeyStorage]을(를) 만드는 중...'; GO CREATE TABLE [dbo].[tPairKeyStorage] ( [cPrimaryKey] NVARCHAR (50) NOT NULL, - [cSecondaryKey] NVARCHAR (50) NOT NULL, + [cSecondaryKey] NVARCHAR (50) NULL, [cValue1] NVARCHAR (200) NULL, [cValue2] NVARCHAR (200) NULL, [cDateTime] DATETIME2 (7) NOT NULL, diff --git a/DBPatch/sqlScripts/SystemX.DB.UniqueKeyDB_Update.sql b/DBPatch/sqlScripts/SystemX.DB.UniqueKeyDB_Update.sql index cb366bc..67e9acf 100644 --- a/DBPatch/sqlScripts/SystemX.DB.UniqueKeyDB_Update.sql +++ b/DBPatch/sqlScripts/SystemX.DB.UniqueKeyDB_Update.sql @@ -42,19 +42,28 @@ USE [$(DatabaseName)]; GO -PRINT N'테이블 [dbo].[tPairKeyStorage]을(를) 만드는 중...'; +PRINT N'UNIQUE 제약 조건 [dbo].[UQ_cMacAddress]을(를) 삭제하는 중...'; GO -CREATE TABLE [dbo].[tPairKeyStorage] ( - [cPrimaryKey] NVARCHAR (50) NOT NULL, - [cSecondaryKey] NVARCHAR (50) NOT NULL, - [cValue1] NVARCHAR (200) NULL, - [cValue2] NVARCHAR (200) NULL, - [cDateTime] DATETIME2 (7) NOT NULL, - CONSTRAINT [PK_cProductKey] PRIMARY KEY CLUSTERED ([cPrimaryKey] ASC), - CONSTRAINT [UQ_cMacAddress] UNIQUE NONCLUSTERED ([cSecondaryKey] ASC) -); +ALTER TABLE [dbo].[tPairKeyStorage] DROP CONSTRAINT [UQ_cMacAddress]; + + +GO +PRINT N'테이블 [dbo].[tPairKeyStorage]을(를) 변경하는 중...'; + + +GO +ALTER TABLE [dbo].[tPairKeyStorage] ALTER COLUMN [cSecondaryKey] NVARCHAR (50) NULL; + + +GO +PRINT N'UNIQUE 제약 조건 [dbo].[UQ_cMacAddress]을(를) 만드는 중...'; + + +GO +ALTER TABLE [dbo].[tPairKeyStorage] + ADD CONSTRAINT [UQ_cMacAddress] UNIQUE NONCLUSTERED ([cSecondaryKey] ASC); GO diff --git a/DBPatch/sqlScripts/dacpac/SystemX.DB.AccountDB.dacpac b/DBPatch/sqlScripts/dacpac/SystemX.DB.AccountDB.dacpac index c9cf4a8..c3fd36a 100644 Binary files a/DBPatch/sqlScripts/dacpac/SystemX.DB.AccountDB.dacpac and b/DBPatch/sqlScripts/dacpac/SystemX.DB.AccountDB.dacpac differ diff --git a/DBPatch/sqlScripts/dacpac/SystemX.DB.CPXV2.dacpac b/DBPatch/sqlScripts/dacpac/SystemX.DB.CPXV2.dacpac index c069279..5aed60d 100644 Binary files a/DBPatch/sqlScripts/dacpac/SystemX.DB.CPXV2.dacpac and b/DBPatch/sqlScripts/dacpac/SystemX.DB.CPXV2.dacpac differ diff --git a/DBPatch/sqlScripts/dacpac/SystemX.DB.CPXV2Log.dacpac b/DBPatch/sqlScripts/dacpac/SystemX.DB.CPXV2Log.dacpac index 0c58b7d..1ab7f29 100644 Binary files a/DBPatch/sqlScripts/dacpac/SystemX.DB.CPXV2Log.dacpac and b/DBPatch/sqlScripts/dacpac/SystemX.DB.CPXV2Log.dacpac differ diff --git a/DBPatch/sqlScripts/dacpac/SystemX.DB.UniqueKeyDB.dacpac b/DBPatch/sqlScripts/dacpac/SystemX.DB.UniqueKeyDB.dacpac index 3e83a9f..bfb4397 100644 Binary files a/DBPatch/sqlScripts/dacpac/SystemX.DB.UniqueKeyDB.dacpac and b/DBPatch/sqlScripts/dacpac/SystemX.DB.UniqueKeyDB.dacpac differ diff --git a/DBPatch/sqlScripts/dacpac/SystemX.DB.VPKI_DataDB.dacpac b/DBPatch/sqlScripts/dacpac/SystemX.DB.VPKI_DataDB.dacpac index 25df9bd..fe24750 100644 Binary files a/DBPatch/sqlScripts/dacpac/SystemX.DB.VPKI_DataDB.dacpac and b/DBPatch/sqlScripts/dacpac/SystemX.DB.VPKI_DataDB.dacpac differ diff --git a/Projects/DLL/SystemX.Core.DB.dll b/Projects/DLL/SystemX.Core.DB.dll index b8b1118..12d8698 100644 Binary files a/Projects/DLL/SystemX.Core.DB.dll and b/Projects/DLL/SystemX.Core.DB.dll differ diff --git a/Projects/DLL/SystemX.Core.dll b/Projects/DLL/SystemX.Core.dll index 6f25c2b..f65683e 100644 Binary files a/Projects/DLL/SystemX.Core.dll and b/Projects/DLL/SystemX.Core.dll differ diff --git a/Projects/SystemX.Core/DB/SystemX.DB.UniqueKeyDB/dbo/Tables/tPairKeyStorage.sql b/Projects/SystemX.Core/DB/SystemX.DB.UniqueKeyDB/dbo/Tables/tPairKeyStorage.sql index ce917fb..1ff306f 100644 --- a/Projects/SystemX.Core/DB/SystemX.DB.UniqueKeyDB/dbo/Tables/tPairKeyStorage.sql +++ b/Projects/SystemX.Core/DB/SystemX.DB.UniqueKeyDB/dbo/Tables/tPairKeyStorage.sql @@ -1,7 +1,7 @@ CREATE TABLE [dbo].[tPairKeyStorage] ( [cPrimaryKey] NVARCHAR(50) NOT NULL, - [cSecondaryKey] NVARCHAR(50) NOT NULL, + [cSecondaryKey] NVARCHAR(50) NULL, [cValue1] NVARCHAR(200), [cValue2] NVARCHAR(200), [cDateTime] DATETIME2 NOT NULL, diff --git a/Projects/SystemX.Core/SystemX.Core.DB/UniqueKeyDB/Tables/tPairKeyStorage.cs b/Projects/SystemX.Core/SystemX.Core.DB/UniqueKeyDB/Tables/tPairKeyStorage.cs index cb30c1d..b768c4e 100644 --- a/Projects/SystemX.Core/SystemX.Core.DB/UniqueKeyDB/Tables/tPairKeyStorage.cs +++ b/Projects/SystemX.Core/SystemX.Core.DB/UniqueKeyDB/Tables/tPairKeyStorage.cs @@ -7,7 +7,7 @@ public partial class tPairKeyStorage { public string cPrimaryKey { get; set; } = null!; - public string cSecondaryKey { get; set; } = null!; + public string? cSecondaryKey { get; set; } public string? cValue1 { get; set; }