Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.Services.Deployment.DataAccess/3.3/SQL Scripts/Initialize Deployment Database.sql @ 17740

Last change on this file since 17740 was 4494, checked in by swagner, 14 years ago

Adapted deployment service (#1165)

File size: 4.9 KB
Line 
1USE [HeuristicLab.Deployment]
2GO
3/****** Object:  Table [dbo].[Plugin]    Script Date: 03/22/2010 15:57:25 ******/
4SET ANSI_NULLS ON
5GO
6SET QUOTED_IDENTIFIER ON
7GO
8CREATE TABLE [dbo].[Plugin](
9  [Id] [bigint] IDENTITY(1,1) NOT NULL,
10  [Name] [nvarchar](300) NOT NULL,
11  [Version] [nvarchar](50) NOT NULL,
12  [ContactName] [text] NULL,
13  [ContactEmail] [text] NULL,
14  [License] [text] NULL,
15 CONSTRAINT [PK_Plugin] PRIMARY KEY CLUSTERED
16(
17  [Id] ASC
18)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
19 CONSTRAINT [IX_Plugin_NameVersion] UNIQUE NONCLUSTERED
20(
21  [Name] ASC,
22  [Version] ASC
23)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
24) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
25GO
26/****** Object:  Table [dbo].[Product]    Script Date: 03/22/2010 15:57:25 ******/
27SET ANSI_NULLS ON
28GO
29SET QUOTED_IDENTIFIER ON
30GO
31CREATE TABLE [dbo].[Product](
32  [Id] [bigint] IDENTITY(1,1) NOT NULL,
33  [Name] [nvarchar](300) NOT NULL,
34  [Version] [nvarchar](50) NOT NULL,
35 CONSTRAINT [PK_Product] PRIMARY KEY CLUSTERED
36(
37  [Id] ASC
38)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
39 CONSTRAINT [IX_Product_NameVersion] UNIQUE NONCLUSTERED
40(
41  [Name] ASC,
42  [Version] ASC
43)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
44) ON [PRIMARY]
45GO
46/****** Object:  Table [dbo].[ProductPlugin]    Script Date: 03/22/2010 15:57:25 ******/
47SET ANSI_NULLS ON
48GO
49SET QUOTED_IDENTIFIER ON
50GO
51CREATE TABLE [dbo].[ProductPlugin](
52  [ProductId] [bigint] NOT NULL,
53  [PluginId] [bigint] NOT NULL,
54 CONSTRAINT [PK_ProductPlugin] PRIMARY KEY CLUSTERED
55(
56  [ProductId] ASC,
57  [PluginId] ASC
58)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
59) ON [PRIMARY]
60GO
61/****** Object:  Table [dbo].[PluginPackage]    Script Date: 03/22/2010 15:57:25 ******/
62SET ANSI_NULLS ON
63GO
64SET QUOTED_IDENTIFIER ON
65GO
66CREATE TABLE [dbo].[PluginPackage](
67  [PluginId] [bigint] NOT NULL,
68  [Data] [image] NOT NULL,
69 CONSTRAINT [PK_PluginPackage] PRIMARY KEY CLUSTERED
70(
71  [PluginId] ASC
72)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
73) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
74GO
75/****** Object:  Table [dbo].[Dependencies]    Script Date: 03/22/2010 15:57:25 ******/
76SET ANSI_NULLS ON
77GO
78SET QUOTED_IDENTIFIER ON
79GO
80CREATE TABLE [dbo].[Dependencies](
81  [PluginId] [bigint] NOT NULL,
82  [DependencyId] [bigint] NOT NULL,
83 CONSTRAINT [PK_Dependencies] PRIMARY KEY CLUSTERED
84(
85  [PluginId] ASC,
86  [DependencyId] ASC
87)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
88) ON [PRIMARY]
89GO
90/****** Object:  Check [CK_Dependencies]    Script Date: 03/22/2010 15:57:25 ******/
91ALTER TABLE [dbo].[Dependencies]  WITH CHECK ADD  CONSTRAINT [CK_Dependencies] CHECK  (([PluginId]<>[DependencyId]))
92GO
93ALTER TABLE [dbo].[Dependencies] CHECK CONSTRAINT [CK_Dependencies]
94GO
95/****** Object:  ForeignKey [FK_ProductPlugin_Plugin]    Script Date: 03/22/2010 15:57:25 ******/
96ALTER TABLE [dbo].[ProductPlugin]  WITH CHECK ADD  CONSTRAINT [FK_ProductPlugin_Plugin] FOREIGN KEY([PluginId])
97REFERENCES [dbo].[Plugin] ([Id])
98GO
99ALTER TABLE [dbo].[ProductPlugin] CHECK CONSTRAINT [FK_ProductPlugin_Plugin]
100GO
101/****** Object:  ForeignKey [FK_ProductPlugin_Product]    Script Date: 03/22/2010 15:57:25 ******/
102ALTER TABLE [dbo].[ProductPlugin]  WITH CHECK ADD  CONSTRAINT [FK_ProductPlugin_Product] FOREIGN KEY([ProductId])
103REFERENCES [dbo].[Product] ([Id])
104GO
105ALTER TABLE [dbo].[ProductPlugin] CHECK CONSTRAINT [FK_ProductPlugin_Product]
106GO
107/****** Object:  ForeignKey [FK_PluginPackage_Plugin]    Script Date: 03/22/2010 15:57:25 ******/
108ALTER TABLE [dbo].[PluginPackage]  WITH CHECK ADD  CONSTRAINT [FK_PluginPackage_Plugin] FOREIGN KEY([PluginId])
109REFERENCES [dbo].[Plugin] ([Id])
110GO
111ALTER TABLE [dbo].[PluginPackage] CHECK CONSTRAINT [FK_PluginPackage_Plugin]
112GO
113/****** Object:  ForeignKey [FK_Dependencies_Plugin]    Script Date: 03/22/2010 15:57:25 ******/
114ALTER TABLE [dbo].[Dependencies]  WITH CHECK ADD  CONSTRAINT [FK_Dependencies_Plugin] FOREIGN KEY([DependencyId])
115REFERENCES [dbo].[Plugin] ([Id])
116GO
117ALTER TABLE [dbo].[Dependencies] CHECK CONSTRAINT [FK_Dependencies_Plugin]
118GO
119/****** Object:  ForeignKey [FK_Dependencies_Plugin2]    Script Date: 03/22/2010 15:57:25 ******/
120ALTER TABLE [dbo].[Dependencies]  WITH CHECK ADD  CONSTRAINT [FK_Dependencies_Plugin2] FOREIGN KEY([PluginId])
121REFERENCES [dbo].[Plugin] ([Id])
122GO
123ALTER TABLE [dbo].[Dependencies] CHECK CONSTRAINT [FK_Dependencies_Plugin2]
124GO
Note: See TracBrowser for help on using the repository browser.