-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
192 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 1,32 @@ | ||
-- Creating table 'FeatureRole' | ||
CREATE TABLE [dbo].[FeatureRole] ( | ||
[Features_Id] int NOT NULL, | ||
[Roles_Id] int NOT NULL | ||
); | ||
GO | ||
-- Creating primary key on [Features_Id], [Roles_Id] in table 'FeatureRole' | ||
ALTER TABLE [dbo].[FeatureRole] | ||
ADD CONSTRAINT [PK_FeatureRole] | ||
PRIMARY KEY CLUSTERED ([Features_Id], [Roles_Id] ASC); | ||
GO | ||
-- Creating foreign key on [Features_Id] in table 'FeatureRole' | ||
ALTER TABLE [dbo].[FeatureRole] | ||
ADD CONSTRAINT [FK_FeatureRole_Feature] | ||
FOREIGN KEY ([Features_Id]) | ||
REFERENCES [dbo].[Features] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
-- Creating foreign key on [Roles_Id] in table 'FeatureRole' | ||
ALTER TABLE [dbo].[FeatureRole] | ||
ADD CONSTRAINT [FK_FeatureRole_Role] | ||
FOREIGN KEY ([Roles_Id]) | ||
REFERENCES [dbo].[Roles] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
-- Creating non-clustered index for FOREIGN KEY 'FK_FeatureRole_Role' | ||
CREATE INDEX [IX_FK_FeatureRole_Role] | ||
ON [dbo].[FeatureRole] | ||
([Roles_Id]); | ||
-- Creating table 'FeatureRole' | ||
CREATE TABLE [dbo].[FeatureRole] ( | ||
[Features_Id] int NOT NULL, | ||
[Roles_Id] int NOT NULL | ||
); | ||
GO | ||
-- Creating primary key on [Features_Id], [Roles_Id] in table 'FeatureRole' | ||
ALTER TABLE [dbo].[FeatureRole] | ||
ADD CONSTRAINT [PK_FeatureRole] | ||
PRIMARY KEY CLUSTERED ([Features_Id], [Roles_Id] ASC); | ||
GO | ||
-- Creating foreign key on [Features_Id] in table 'FeatureRole' | ||
ALTER TABLE [dbo].[FeatureRole] | ||
ADD CONSTRAINT [FK_FeatureRole_Feature] | ||
FOREIGN KEY ([Features_Id]) | ||
REFERENCES [dbo].[Features] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
-- Creating foreign key on [Roles_Id] in table 'FeatureRole' | ||
ALTER TABLE [dbo].[FeatureRole] | ||
ADD CONSTRAINT [FK_FeatureRole_Role] | ||
FOREIGN KEY ([Roles_Id]) | ||
REFERENCES [dbo].[Roles] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
-- Creating non-clustered index for FOREIGN KEY 'FK_FeatureRole_Role' | ||
CREATE INDEX [IX_FK_FeatureRole_Role] | ||
ON [dbo].[FeatureRole] | ||
([Roles_Id]); | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 1,12 @@ | ||
-- Creating table 'Features' | ||
CREATE TABLE [dbo].[Features] ( | ||
[Id] int IDENTITY(1,1) NOT NULL, | ||
[Name] nvarchar(max) NOT NULL, | ||
[Description] nvarchar(max) NOT NULL | ||
); | ||
GO | ||
-- Creating primary key on [Id] in table 'Features' | ||
ALTER TABLE [dbo].[Features] | ||
ADD CONSTRAINT [PK_Features] | ||
PRIMARY KEY CLUSTERED ([Id] ASC); | ||
GO | ||
-- Creating table 'Features' | ||
CREATE TABLE [dbo].[Features] ( | ||
[Id] int IDENTITY(1,1) NOT NULL, | ||
[Name] nvarchar(max) NOT NULL, | ||
[Description] nvarchar(max) NOT NULL | ||
); | ||
GO | ||
-- Creating primary key on [Id] in table 'Features' | ||
ALTER TABLE [dbo].[Features] | ||
ADD CONSTRAINT [PK_Features] | ||
PRIMARY KEY CLUSTERED ([Id] ASC); | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 1,32 @@ | ||
-- Creating table 'FlagProperties' | ||
CREATE TABLE [dbo].[FlagProperties] ( | ||
[Id] int IDENTITY(1,1) NOT NULL, | ||
[Name] nvarchar(max) NOT NULL, | ||
[Description] nvarchar(max) NOT NULL, | ||
[PropertyKey] nvarchar(max) NOT NULL, | ||
[PropertyValue] nvarchar(max) NOT NULL, | ||
[FlagId] int NOT NULL | ||
); | ||
GO | ||
|
||
-- Creating primary key on [Id] in table 'FlagProperties' | ||
ALTER TABLE [dbo].[FlagProperties] | ||
ADD CONSTRAINT [PK_FlagProperties] | ||
PRIMARY KEY CLUSTERED ([Id] ASC); | ||
GO | ||
|
||
-- Creating foreign key on [FlagId] in table 'FlagProperties' | ||
ALTER TABLE [dbo].[FlagProperties] | ||
ADD CONSTRAINT [FK_FlagToFlagProperty] | ||
FOREIGN KEY ([FlagId]) | ||
REFERENCES [dbo].[Flags] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
|
||
-- Creating non-clustered index for FOREIGN KEY 'FK_FlagToFlagProperty' | ||
CREATE INDEX [IX_FK_FlagToFlagProperty] | ||
ON [dbo].[FlagProperties] | ||
([FlagId]); | ||
GO | ||
|
||
-- Creating table 'FlagProperties' | ||
CREATE TABLE [dbo].[FlagProperties] ( | ||
[Id] int IDENTITY(1,1) NOT NULL, | ||
[Name] nvarchar(max) NOT NULL, | ||
[Description] nvarchar(max) NOT NULL, | ||
[PropertyKey] nvarchar(max) NOT NULL, | ||
[PropertyValue] nvarchar(max) NOT NULL, | ||
[FlagId] int NOT NULL | ||
); | ||
GO | ||
|
||
-- Creating primary key on [Id] in table 'FlagProperties' | ||
ALTER TABLE [dbo].[FlagProperties] | ||
ADD CONSTRAINT [PK_FlagProperties] | ||
PRIMARY KEY CLUSTERED ([Id] ASC); | ||
GO | ||
|
||
-- Creating foreign key on [FlagId] in table 'FlagProperties' | ||
ALTER TABLE [dbo].[FlagProperties] | ||
ADD CONSTRAINT [FK_FlagToFlagProperty] | ||
FOREIGN KEY ([FlagId]) | ||
REFERENCES [dbo].[Flags] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
|
||
-- Creating non-clustered index for FOREIGN KEY 'FK_FlagToFlagProperty' | ||
CREATE INDEX [IX_FK_FlagToFlagProperty] | ||
ON [dbo].[FlagProperties] | ||
([FlagId]); | ||
GO | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 1,29 @@ | ||
-- Creating table 'Flags' | ||
CREATE TABLE [dbo].[Flags] ( | ||
[Id] int IDENTITY(1,1) NOT NULL, | ||
[Name] nvarchar(max) NOT NULL, | ||
[Description] nvarchar(max) NOT NULL, | ||
[FeatureId] int NOT NULL | ||
); | ||
GO | ||
|
||
-- Creating primary key on [Id] in table 'Flags' | ||
ALTER TABLE [dbo].[Flags] | ||
ADD CONSTRAINT [PK_Flags] | ||
PRIMARY KEY CLUSTERED ([Id] ASC); | ||
GO | ||
|
||
-- Creating foreign key on [FeatureId] in table 'Flags' | ||
ALTER TABLE [dbo].[Flags] | ||
ADD CONSTRAINT [FK_FeatureFlag] | ||
FOREIGN KEY ([FeatureId]) | ||
REFERENCES [dbo].[Features] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
|
||
-- Creating non-clustered index for FOREIGN KEY 'FK_FeatureFlag' | ||
CREATE INDEX [IX_FK_FeatureFlag] | ||
ON [dbo].[Flags] | ||
([FeatureId]); | ||
GO | ||
-- Creating table 'Flags' | ||
CREATE TABLE [dbo].[Flags] ( | ||
[Id] int IDENTITY(1,1) NOT NULL, | ||
[Name] nvarchar(max) NOT NULL, | ||
[Description] nvarchar(max) NOT NULL, | ||
[FeatureId] int NOT NULL | ||
); | ||
GO | ||
|
||
-- Creating primary key on [Id] in table 'Flags' | ||
ALTER TABLE [dbo].[Flags] | ||
ADD CONSTRAINT [PK_Flags] | ||
PRIMARY KEY CLUSTERED ([Id] ASC); | ||
GO | ||
|
||
-- Creating foreign key on [FeatureId] in table 'Flags' | ||
ALTER TABLE [dbo].[Flags] | ||
ADD CONSTRAINT [FK_FeatureFlag] | ||
FOREIGN KEY ([FeatureId]) | ||
REFERENCES [dbo].[Features] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
|
||
-- Creating non-clustered index for FOREIGN KEY 'FK_FeatureFlag' | ||
CREATE INDEX [IX_FK_FeatureFlag] | ||
ON [dbo].[Flags] | ||
([FeatureId]); | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 1,16 @@ | ||
-- Creating table 'Roles' | ||
CREATE TABLE [dbo].[Roles] ( | ||
[Id] INT IDENTITY (1, 1) NOT NULL, | ||
[Name] NVARCHAR (MAX) NOT NULL, | ||
[Description] NVARCHAR (MAX) NOT NULL, | ||
[LastUpdatedBy] NVARCHAR (50) NOT NULL, | ||
[LastUpdatedAt] DATETIME NOT NULL, | ||
[UpdateVersion] ROWVERSION NULL, | ||
CONSTRAINT [PK_Roles] PRIMARY KEY CLUSTERED ([Id] ASC) | ||
); | ||
|
||
|
||
GO | ||
-- Creating primary key on [Id] in table 'Roles' | ||
|
||
-- Creating table 'Roles' | ||
CREATE TABLE [dbo].[Roles] ( | ||
[Id] INT IDENTITY (1, 1) NOT NULL, | ||
[Name] NVARCHAR (MAX) NOT NULL, | ||
[Description] NVARCHAR (MAX) NOT NULL, | ||
[LastUpdatedBy] NVARCHAR (50) NOT NULL, | ||
[LastUpdatedAt] DATETIME NOT NULL, | ||
[UpdateVersion] ROWVERSION NULL, | ||
CONSTRAINT [PK_Roles] PRIMARY KEY CLUSTERED ([Id] ASC) | ||
); | ||
|
||
|
||
GO | ||
-- Creating primary key on [Id] in table 'Roles' | ||
|
||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 1,32 @@ | ||
-- Creating table 'UserFeature' | ||
CREATE TABLE [dbo].[UserFeature] ( | ||
[Users_Id] int NOT NULL, | ||
[Features_Id] int NOT NULL | ||
); | ||
GO | ||
-- Creating primary key on [Users_Id], [Features_Id] in table 'UserFeature' | ||
ALTER TABLE [dbo].[UserFeature] | ||
ADD CONSTRAINT [PK_UserFeature] | ||
PRIMARY KEY CLUSTERED ([Users_Id], [Features_Id] ASC); | ||
GO | ||
-- Creating foreign key on [Users_Id] in table 'UserFeature' | ||
ALTER TABLE [dbo].[UserFeature] | ||
ADD CONSTRAINT [FK_UserFeature_User] | ||
FOREIGN KEY ([Users_Id]) | ||
REFERENCES [dbo].[Users] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
-- Creating foreign key on [Features_Id] in table 'UserFeature' | ||
ALTER TABLE [dbo].[UserFeature] | ||
ADD CONSTRAINT [FK_UserFeature_Feature] | ||
FOREIGN KEY ([Features_Id]) | ||
REFERENCES [dbo].[Features] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
-- Creating non-clustered index for FOREIGN KEY 'FK_UserFeature_Feature' | ||
CREATE INDEX [IX_FK_UserFeature_Feature] | ||
ON [dbo].[UserFeature] | ||
([Features_Id]); | ||
-- Creating table 'UserFeature' | ||
CREATE TABLE [dbo].[UserFeature] ( | ||
[Users_Id] int NOT NULL, | ||
[Features_Id] int NOT NULL | ||
); | ||
GO | ||
-- Creating primary key on [Users_Id], [Features_Id] in table 'UserFeature' | ||
ALTER TABLE [dbo].[UserFeature] | ||
ADD CONSTRAINT [PK_UserFeature] | ||
PRIMARY KEY CLUSTERED ([Users_Id], [Features_Id] ASC); | ||
GO | ||
-- Creating foreign key on [Users_Id] in table 'UserFeature' | ||
ALTER TABLE [dbo].[UserFeature] | ||
ADD CONSTRAINT [FK_UserFeature_User] | ||
FOREIGN KEY ([Users_Id]) | ||
REFERENCES [dbo].[Users] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
-- Creating foreign key on [Features_Id] in table 'UserFeature' | ||
ALTER TABLE [dbo].[UserFeature] | ||
ADD CONSTRAINT [FK_UserFeature_Feature] | ||
FOREIGN KEY ([Features_Id]) | ||
REFERENCES [dbo].[Features] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
-- Creating non-clustered index for FOREIGN KEY 'FK_UserFeature_Feature' | ||
CREATE INDEX [IX_FK_UserFeature_Feature] | ||
ON [dbo].[UserFeature] | ||
([Features_Id]); | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 1,32 @@ | ||
-- Creating table 'UserRole' | ||
CREATE TABLE [dbo].[UserRole] ( | ||
[Users_Id] int NOT NULL, | ||
[Roles_Id] int NOT NULL | ||
); | ||
GO | ||
-- Creating primary key on [Users_Id], [Roles_Id] in table 'UserRole' | ||
ALTER TABLE [dbo].[UserRole] | ||
ADD CONSTRAINT [PK_UserRole] | ||
PRIMARY KEY CLUSTERED ([Users_Id], [Roles_Id] ASC); | ||
GO | ||
-- Creating foreign key on [Users_Id] in table 'UserRole' | ||
ALTER TABLE [dbo].[UserRole] | ||
ADD CONSTRAINT [FK_UserRole_User] | ||
FOREIGN KEY ([Users_Id]) | ||
REFERENCES [dbo].[Users] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
-- Creating foreign key on [Roles_Id] in table 'UserRole' | ||
ALTER TABLE [dbo].[UserRole] | ||
ADD CONSTRAINT [FK_UserRole_Role] | ||
FOREIGN KEY ([Roles_Id]) | ||
REFERENCES [dbo].[Roles] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
-- Creating non-clustered index for FOREIGN KEY 'FK_UserRole_Role' | ||
CREATE INDEX [IX_FK_UserRole_Role] | ||
ON [dbo].[UserRole] | ||
([Roles_Id]); | ||
-- Creating table 'UserRole' | ||
CREATE TABLE [dbo].[UserRole] ( | ||
[Users_Id] int NOT NULL, | ||
[Roles_Id] int NOT NULL | ||
); | ||
GO | ||
-- Creating primary key on [Users_Id], [Roles_Id] in table 'UserRole' | ||
ALTER TABLE [dbo].[UserRole] | ||
ADD CONSTRAINT [PK_UserRole] | ||
PRIMARY KEY CLUSTERED ([Users_Id], [Roles_Id] ASC); | ||
GO | ||
-- Creating foreign key on [Users_Id] in table 'UserRole' | ||
ALTER TABLE [dbo].[UserRole] | ||
ADD CONSTRAINT [FK_UserRole_User] | ||
FOREIGN KEY ([Users_Id]) | ||
REFERENCES [dbo].[Users] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
-- Creating foreign key on [Roles_Id] in table 'UserRole' | ||
ALTER TABLE [dbo].[UserRole] | ||
ADD CONSTRAINT [FK_UserRole_Role] | ||
FOREIGN KEY ([Roles_Id]) | ||
REFERENCES [dbo].[Roles] | ||
([Id]) | ||
ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
GO | ||
-- Creating non-clustered index for FOREIGN KEY 'FK_UserRole_Role' | ||
CREATE INDEX [IX_FK_UserRole_Role] | ||
ON [dbo].[UserRole] | ||
([Roles_Id]); | ||
GO |
Oops, something went wrong.