[성현모] SecondaryKey Null허용으로 수정

This commit is contained in:
SHM
2025-10-30 09:48:05 +09:00
parent 05fb9a64e1
commit 29ea311cd3
11 changed files with 22 additions and 13 deletions

View File

@ -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,

View File

@ -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

Binary file not shown.

Binary file not shown.

View File

@ -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,

View File

@ -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; }