[성현모] SecondaryKey Null허용으로 수정
This commit is contained in:
@ -266,7 +266,7 @@ PRINT N'테이블 [dbo].[tPairKeyStorage]을(를) 만드는 중...';
|
|||||||
GO
|
GO
|
||||||
CREATE TABLE [dbo].[tPairKeyStorage] (
|
CREATE TABLE [dbo].[tPairKeyStorage] (
|
||||||
[cPrimaryKey] NVARCHAR (50) NOT NULL,
|
[cPrimaryKey] NVARCHAR (50) NOT NULL,
|
||||||
[cSecondaryKey] NVARCHAR (50) NOT NULL,
|
[cSecondaryKey] NVARCHAR (50) NULL,
|
||||||
[cValue1] NVARCHAR (200) NULL,
|
[cValue1] NVARCHAR (200) NULL,
|
||||||
[cValue2] NVARCHAR (200) NULL,
|
[cValue2] NVARCHAR (200) NULL,
|
||||||
[cDateTime] DATETIME2 (7) NOT NULL,
|
[cDateTime] DATETIME2 (7) NOT NULL,
|
||||||
|
|||||||
@ -42,19 +42,28 @@ USE [$(DatabaseName)];
|
|||||||
|
|
||||||
|
|
||||||
GO
|
GO
|
||||||
PRINT N'테이블 [dbo].[tPairKeyStorage]을(를) 만드는 중...';
|
PRINT N'UNIQUE 제약 조건 [dbo].[UQ_cMacAddress]을(를) 삭제하는 중...';
|
||||||
|
|
||||||
|
|
||||||
GO
|
GO
|
||||||
CREATE TABLE [dbo].[tPairKeyStorage] (
|
ALTER TABLE [dbo].[tPairKeyStorage] DROP CONSTRAINT [UQ_cMacAddress];
|
||||||
[cPrimaryKey] NVARCHAR (50) NOT NULL,
|
|
||||||
[cSecondaryKey] NVARCHAR (50) NOT NULL,
|
|
||||||
[cValue1] NVARCHAR (200) NULL,
|
GO
|
||||||
[cValue2] NVARCHAR (200) NULL,
|
PRINT N'테이블 [dbo].[tPairKeyStorage]을(를) 변경하는 중...';
|
||||||
[cDateTime] DATETIME2 (7) NOT NULL,
|
|
||||||
CONSTRAINT [PK_cProductKey] PRIMARY KEY CLUSTERED ([cPrimaryKey] ASC),
|
|
||||||
CONSTRAINT [UQ_cMacAddress] UNIQUE NONCLUSTERED ([cSecondaryKey] ASC)
|
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
|
GO
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
CREATE TABLE [dbo].[tPairKeyStorage]
|
CREATE TABLE [dbo].[tPairKeyStorage]
|
||||||
(
|
(
|
||||||
[cPrimaryKey] NVARCHAR(50) NOT NULL,
|
[cPrimaryKey] NVARCHAR(50) NOT NULL,
|
||||||
[cSecondaryKey] NVARCHAR(50) NOT NULL,
|
[cSecondaryKey] NVARCHAR(50) NULL,
|
||||||
[cValue1] NVARCHAR(200),
|
[cValue1] NVARCHAR(200),
|
||||||
[cValue2] NVARCHAR(200),
|
[cValue2] NVARCHAR(200),
|
||||||
[cDateTime] DATETIME2 NOT NULL,
|
[cDateTime] DATETIME2 NOT NULL,
|
||||||
|
|||||||
@ -7,7 +7,7 @@ public partial class tPairKeyStorage
|
|||||||
{
|
{
|
||||||
public string cPrimaryKey { get; set; } = null!;
|
public string cPrimaryKey { get; set; } = null!;
|
||||||
|
|
||||||
public string cSecondaryKey { get; set; } = null!;
|
public string? cSecondaryKey { get; set; }
|
||||||
|
|
||||||
public string? cValue1 { get; set; }
|
public string? cValue1 { get; set; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user