History

GSF.TimeSeries: Added unique index to ApplicationRole in SQL scripts.

StephenCWills committed 12 years ago

Commit df2dfa21 parent d0046317 files · +49 −3Browse files

Showing the changes to Source/Libraries/GSF.TimeSeries/Data/MySQL/GSFSchema.sql (1 of 7 files). Show all

Unified · Split

Source/Libraries/GSF.TimeSeries/Data/MySQL/GSFSchema.sql+10−3
@@ -34,6 +34,12 @@ USE GSFSchema; · 33 unmodified lines
3434 -- CREATE USER NewUser IDENTIFIED BY 'MyPassword';
3535 -- GRANT SELECT, UPDATE, INSERT, DELETE ON GSFSchema.* TO NewUser;
3636
37+-- *******************************************************************************************
38+-- IMPORTANT NOTE: When making updates to this schema, please increment the version number!
39+-- *******************************************************************************************
40+CREATE VIEW SchemaVersion AS
41+SELECT 1 AS VersionNumber;
42+
3743 CREATE TABLE ErrorLog(
3844 ID INT AUTO_INCREMENT NOT NULL,
3945 Source VARCHAR(200) NOT NULL,
@@ -591,7 +597,7 @@ CREATE TABLE UserAccount ( · 551 unmodified lines
591597 UpdatedOn DATETIME NOT NULL DEFAULT N'0000-00-00 00:00:00',
592598 UpdatedBy VARCHAR(200) NOT NULL DEFAULT N'',
593599 CONSTRAINT PK_UserAccount PRIMARY KEY (ID ASC),
594− CONSTRAINT IX_UserAccount UNIQUE KEY (Name)
600+ CONSTRAINT IX_UserAccount UNIQUE KEY (Name ASC)
595601 );
596602
597603 CREATE TABLE SecurityGroup (
@@ -603,7 +609,7 @@ CREATE TABLE SecurityGroup ( · 5 unmodified lines
603609 UpdatedOn DATETIME NOT NULL DEFAULT N'0000-00-00 00:00:00',
604610 UpdatedBy VARCHAR(200) NOT NULL DEFAULT N'',
605611 CONSTRAINT PK_SecurityGroup PRIMARY KEY (ID ASC),
606− CONSTRAINT IX_SecurityGroup UNIQUE KEY (Name)
612+ CONSTRAINT IX_SecurityGroup UNIQUE KEY (Name ASC)
607613 );
608614
609615 CREATE TABLE ApplicationRole (
@@ -615,7 +621,8 @@ CREATE TABLE ApplicationRole ( · 5 unmodified lines
615621 CreatedBy VARCHAR(200) NOT NULL DEFAULT N'',
616622 UpdatedOn DATETIME NOT NULL DEFAULT N'0000-00-00 00:00:00',
617623 UpdatedBy VARCHAR(200) NOT NULL DEFAULT N'',
618− CONSTRAINT PK_ApplicationRole PRIMARY KEY (ID ASC)
624+ CONSTRAINT PK_ApplicationRole PRIMARY KEY (ID ASC),
625+ CONSTRAINT IX_ApplicationRole UNIQUE KEY (NodeID ASC, Name ASC)
619626 );
620627
621628 CREATE TABLE ApplicationRoleSecurityGroup (

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t