更新脚本:数据库统一脚本,设置Dicts表Define列不可为空默认值为1

This commit is contained in:
Argo-Surface 2019-01-12 17:59:42 +08:00
parent 8f32a12e4e
commit 39b0ad8949
3 changed files with 3 additions and 2 deletions

View File

@ -328,6 +328,7 @@ EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字典代码'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0表示系统使用1表示自定义' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dicts', @level2type=N'COLUMN',@level2name=N'Define'
GO
/****** Object: Default [DF_Dicts_Define] Script Date: 11/12/2016 15:49:11 ******/
ALTER TABLE [dbo].[Dicts] ADD CONSTRAINT [DF_Dicts_Define] DEFAULT ((1)) FOR [Define]
GO

View File

@ -103,7 +103,7 @@ CREATE TABLE Dicts(
Category VARCHAR (50) NOT NULL,
Name VARCHAR (50) NOT NULL,
Code VARCHAR (500) NOT NULL,
Define INT DEFAULT 1
Define INT NOT NULL DEFAULT 1
);
CREATE TABLE Messages(

View File

@ -103,7 +103,7 @@ CREATE TABLE Dicts(
[Category] VARCHAR (50) NOT NULL,
[Name] VARCHAR (50) NOT NULL,
[Code] VARCHAR (500) NOT NULL,
[Define] INT DEFAULT (1)
[Define] INT NOT NULL DEFAULT (1)
);
CREATE TABLE Messages(