Created
March 14, 2023 13:20
-
-
Save vinijmoura/501cdd36f1af2f83ef1722bf18b32f21 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
CREATE TABLE [dbo].[Organization]( | |
[OrganizationId] [varchar](20) NOT NULL, | |
[OrganizationName] [varchar](100) NOT NULL, | |
CONSTRAINT [PK_Organization] PRIMARY KEY CLUSTERED | |
( | |
[OrganizationId] ASC | |
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] | |
) | |
GO | |
CREATE TABLE [dbo].[Repositories]( | |
[OrganizationId] [varchar](20) NOT NULL, | |
[RepositoryId] [varchar](20) NOT NULL, | |
[RepositoryName] [varchar](100) NOT NULL, | |
FOREIGN KEY (OrganizationId) REFERENCES Organization(OrganizationId), | |
CONSTRAINT [PK_Repositories] PRIMARY KEY CLUSTERED | |
( | |
[RepositoryId] ASC | |
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] | |
) | |
GO | |
CREATE TABLE [dbo].[VariablesOrganization]( | |
[OrganizationId] [varchar](20) NOT NULL, | |
[VariableName] [varchar](100) NOT NULL, | |
[VariableCreatedDate] [datetime] NOT NULL, | |
[VariableVisibility] [varchar](30) NOT NULL, | |
FOREIGN KEY (OrganizationId) REFERENCES Organization(OrganizationId), | |
) | |
GO | |
CREATE TABLE [dbo].[VariablesRepositories]( | |
[RepositoryId] [varchar](20) NOT NULL, | |
[VariableName] [varchar](100) NOT NULL, | |
[VariableCreatedDate] [datetime] NOT NULL, | |
FOREIGN KEY (RepositoryId) REFERENCES Repositories(RepositoryId) | |
) | |
GO | |
CREATE TABLE [dbo].[VariablesRepositoriesEnvironments]( | |
[RepositoryId] [varchar](20) NOT NULL, | |
[EnvironmentName] [varchar](100) NOT NULL, | |
[VariableName] [varchar](100) NOT NULL, | |
[VariableCreatedDate] [datetime] NOT NULL, | |
FOREIGN KEY (RepositoryId) REFERENCES Repositories(RepositoryId) | |
) | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment