更新脚本:增加数据库脚本,增加忽略大小写与不可为空约束

This commit is contained in:
Argo Zhang 2019-02-26 17:02:38 +08:00 committed by Argo-Surface
parent a670e68ba6
commit 2d3b074959
6 changed files with 23 additions and 23 deletions

View File

@ -101,7 +101,7 @@ SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Roles](
[ID] [int] IDENTITY(1,1) NOT NULL,
[RoleName] [nvarchar](50) NULL,
[RoleName] [nvarchar](50) NOT NULL,
[Description] [nvarchar](500) NULL,
CONSTRAINT [PK_Roles] PRIMARY KEY CLUSTERED
(
@ -288,7 +288,7 @@ SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Groups](
[ID] [int] IDENTITY(1,1) NOT NULL,
[GroupName] [nvarchar](50) NULL,
[GroupName] [nvarchar](50) NOT NULL,
[Description] [nvarchar](500) NULL,
CONSTRAINT [PK_Groups] PRIMARY KEY CLUSTERED
(
@ -451,8 +451,8 @@ CREATE TABLE [dbo].[RejectUsers](
[UserName] [varchar](50) NOT NULL,
[DisplayName] [nvarchar](50) NOT NULL,
[RegisterTime] [datetime] NOT NULL,
[RejectedBy] [varchar](50) NULL,
[RejectedTime] [datetime] NULL,
[RejectedBy] [varchar](50) NOT NULL,
[RejectedTime] [datetime] NOT NULL,
[RejectedReason] [nvarchar](50) NULL,
CONSTRAINT [PK_RejectUsers] PRIMARY KEY CLUSTERED
(

View File

@ -29,7 +29,7 @@ CREATE TABLE UserGroup(
CREATE TABLE Roles(
ID INTEGER PRIMARY KEY Auto_increment,
RoleName VARCHAR (50) NULL,
RoleName VARCHAR (50) NOT NULL,
Description VARCHAR (500) NULL
);
@ -88,7 +88,7 @@ CREATE TABLE Logs(
CREATE TABLE `Groups`(
ID INTEGER PRIMARY KEY Auto_increment,
GroupName VARCHAR (50) NULL,
GroupName VARCHAR (50) NOT NULL,
Description VARCHAR (500) NULL
);
@ -140,7 +140,7 @@ CREATE TABLE RejectUsers(
UserName VARCHAR (50) NOT NULL,
DisplayName VARCHAR (50) NOT NULL,
RegisterTime DATETIME NOT NULL,
RejectedBy VARCHAR (50) NULL,
RejectedTime DATETIME NULL,
RejectedBy VARCHAR (50) NOT NULL,
RejectedTime DATETIME NOT NULL,
RejectedReason VARCHAR (50) NULL
);

View File

@ -29,7 +29,7 @@ CREATE TABLE UserGroup(
CREATE TABLE Roles(
ID SERIAL PRIMARY KEY,
RoleName VARCHAR (50) NULL,
RoleName VARCHAR (50) NOT NULL,
Description VARCHAR (500) NULL
);
@ -88,7 +88,7 @@ CREATE TABLE Logs(
CREATE TABLE Groups(
ID SERIAL PRIMARY KEY,
GroupName VARCHAR (50) NULL,
GroupName VARCHAR (50) NOT NULL,
Description VARCHAR (500) NULL
);
@ -140,7 +140,7 @@ CREATE TABLE RejectUsers(
UserName VARCHAR (50) NOT NULL,
DisplayName VARCHAR (50) NOT NULL,
RegisterTime DATE NOT NULL,
RejectedBy VARCHAR (50) NULL,
RejectedTime DATE NULL,
RejectedBy VARCHAR (50) NOT NULL,
RejectedTime DATE NOT NULL,
RejectedReason VARCHAR (50) NULL
);

View File

@ -79,7 +79,7 @@ Delete From [Dicts] Where Category = '应用程序' and Code = 2;
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('应用程序', '测试平台', 2, 0);
Delete From [Dicts] Where Category = '测试平台';
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '网站标题', 'BA Client', 1);
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '网站标题', '前台演示系统', 1);
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '网站页脚', '通用后台管理测试平台', 1);
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '个人中心地址', 'http://localhost:50852/Admin/Profiles', 1);
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统设置地址', 'http://localhost:50852/Admin/Settings', 1);

View File

@ -8,7 +8,7 @@
[ApprovedTime] DATETIME,
[ApprovedBy] VARCHAR (50),
[Description] VARCHAR (500) NOT NULL,
[RejectedBy] VARCHAR (50),
[RejectedBy] VARCHAR (50) COLLATE NOCASE,
[RejectedTime] DATETIME,
[RejectedReason] VARCHAR (50),
[Icon] VARCHAR (50),
@ -29,7 +29,7 @@ CREATE TABLE UserGroup(
CREATE TABLE Roles(
[ID] INTEGER PRIMARY KEY,
[RoleName] VARCHAR (50) NULL,
[RoleName] VARCHAR (50) NOT NULL COLLATE NOCASE,
[Description] VARCHAR (500) NULL
);
@ -41,7 +41,7 @@ CREATE TABLE RoleGroup(
CREATE TABLE RoleApp(
[ID] INTEGER PRIMARY KEY,
[AppID] VARCHAR (50) NOT NULL,
[AppID] VARCHAR (50) NOT NULL COLLATE NOCASE,
[RoleID] INT NOT NULL
);
@ -88,7 +88,7 @@ CREATE TABLE Logs(
CREATE TABLE Groups(
[ID] INTEGER PRIMARY KEY,
[GroupName] VARCHAR (50) NULL,
[GroupName] VARCHAR (50) NOT NULL COLLATE NOCASE,
[Description] VARCHAR (500) NULL
);
@ -127,9 +127,9 @@ CREATE TABLE Messages(
CREATE TABLE Tasks(
[ID] INTEGER PRIMARY KEY,
[TaskName] VARCHAR (500) NOT NULL,
[AssignName] VARCHAR (50) NOT NULL,
[UserName] VARCHAR (50) NOT NULL,
[TaskName] VARCHAR (500) NOT NULL COLLATE NOCASE,
[AssignName] VARCHAR (50) NOT NULL COLLATE NOCASE,
[UserName] VARCHAR (50) NOT NULL COLLATE NOCASE,
[TaskTime] INT NOT NULL,
[TaskProgress] INT NOT NULL,
[AssignTime] DATETIME NOT NULL
@ -137,10 +137,10 @@ CREATE TABLE Tasks(
CREATE TABLE RejectUsers(
[ID] INTEGER PRIMARY KEY,
[UserName] VARCHAR (50) NOT NULL,
[UserName] VARCHAR (50) NOT NULL COLLATE NOCASE,
[DisplayName] VARCHAR (50) NOT NULL,
[RegisterTime] DATETIME NOT NULL,
[RejectedBy] VARCHAR (50) NULL,
[RejectedTime] DATETIME NULL,
[RejectedBy] VARCHAR (50) NOT NULL COLLATE NOCASE,
[RejectedTime] DATETIME NOT NULL,
[RejectedReason] VARCHAR (50) NULL
);

Binary file not shown.