Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Services.Deployment.DataAccess/3.3/CreateDeploymentServiceDatabase.sql @ 3099

Last change on this file since 3099 was 3086, checked in by gkronber, 15 years ago

Copied script to create the database for the deployment service from feature development branch. #918 (Integrate deployment service into trunk and HL3.3 solution file)

File size: 7.1 KB
Line 
1USE [master]
2GO
3
4/****** Object:  Database [HeuristicLab.PluginStore]    Script Date: 02/08/2010 19:01:45 ******/
5CREATE DATABASE [HeuristicLab.PluginStore] ON  PRIMARY
6( NAME = N'HeuristicLab.PluginStore', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\HeuristicLab.PluginStore.mdf' , SIZE = 22528KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
7 LOG ON
8( NAME = N'HeuristicLab.PluginStore_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\HeuristicLab.PluginStore_log.ldf' , SIZE = 2816KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
9GO
10
11ALTER DATABASE [HeuristicLab.PluginStore] SET COMPATIBILITY_LEVEL = 90
12GO
13
14IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
15begin
16EXEC [HeuristicLab.PluginStore].[dbo].[sp_fulltext_database] @action = 'enable'
17end
18GO
19
20ALTER DATABASE [HeuristicLab.PluginStore] SET ANSI_NULL_DEFAULT OFF
21GO
22
23ALTER DATABASE [HeuristicLab.PluginStore] SET ANSI_NULLS OFF
24GO
25
26ALTER DATABASE [HeuristicLab.PluginStore] SET ANSI_PADDING OFF
27GO
28
29ALTER DATABASE [HeuristicLab.PluginStore] SET ANSI_WARNINGS OFF
30GO
31
32ALTER DATABASE [HeuristicLab.PluginStore] SET ARITHABORT OFF
33GO
34
35ALTER DATABASE [HeuristicLab.PluginStore] SET AUTO_CLOSE OFF
36GO
37
38ALTER DATABASE [HeuristicLab.PluginStore] SET AUTO_CREATE_STATISTICS ON
39GO
40
41ALTER DATABASE [HeuristicLab.PluginStore] SET AUTO_SHRINK OFF
42GO
43
44ALTER DATABASE [HeuristicLab.PluginStore] SET AUTO_UPDATE_STATISTICS ON
45GO
46
47ALTER DATABASE [HeuristicLab.PluginStore] SET CURSOR_CLOSE_ON_COMMIT OFF
48GO
49
50ALTER DATABASE [HeuristicLab.PluginStore] SET CURSOR_DEFAULT  GLOBAL
51GO
52
53ALTER DATABASE [HeuristicLab.PluginStore] SET CONCAT_NULL_YIELDS_NULL OFF
54GO
55
56ALTER DATABASE [HeuristicLab.PluginStore] SET NUMERIC_ROUNDABORT OFF
57GO
58
59ALTER DATABASE [HeuristicLab.PluginStore] SET QUOTED_IDENTIFIER OFF
60GO
61
62ALTER DATABASE [HeuristicLab.PluginStore] SET RECURSIVE_TRIGGERS OFF
63GO
64
65ALTER DATABASE [HeuristicLab.PluginStore] SET  DISABLE_BROKER
66GO
67
68ALTER DATABASE [HeuristicLab.PluginStore] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
69GO
70
71ALTER DATABASE [HeuristicLab.PluginStore] SET DATE_CORRELATION_OPTIMIZATION OFF
72GO
73
74ALTER DATABASE [HeuristicLab.PluginStore] SET TRUSTWORTHY OFF
75GO
76
77ALTER DATABASE [HeuristicLab.PluginStore] SET ALLOW_SNAPSHOT_ISOLATION OFF
78GO
79
80ALTER DATABASE [HeuristicLab.PluginStore] SET PARAMETERIZATION SIMPLE
81GO
82
83ALTER DATABASE [HeuristicLab.PluginStore] SET READ_COMMITTED_SNAPSHOT OFF
84GO
85
86ALTER DATABASE [HeuristicLab.PluginStore] SET  READ_WRITE
87GO
88
89ALTER DATABASE [HeuristicLab.PluginStore] SET RECOVERY SIMPLE
90GO
91
92ALTER DATABASE [HeuristicLab.PluginStore] SET  MULTI_USER
93GO
94
95ALTER DATABASE [HeuristicLab.PluginStore] SET PAGE_VERIFY CHECKSUM 
96GO
97
98ALTER DATABASE [HeuristicLab.PluginStore] SET DB_CHAINING OFF
99GO
100
101USE [HeuristicLab.PluginStore]
102GO
103
104/****** Object:  Table [dbo].[Dependencies]    Script Date: 02/08/2010 19:02:19 ******/
105SET ANSI_NULLS ON
106GO
107
108SET QUOTED_IDENTIFIER ON
109GO
110
111CREATE TABLE [dbo].[Dependencies](
112  [PluginId] [bigint] NOT NULL,
113  [DependencyId] [bigint] NOT NULL,
114 CONSTRAINT [PK_Dependencies] PRIMARY KEY CLUSTERED
115(
116  [PluginId] ASC,
117  [DependencyId] ASC
118)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
119) ON [PRIMARY]
120
121GO
122
123ALTER TABLE [dbo].[Dependencies]  WITH CHECK ADD  CONSTRAINT [FK_Dependencies_Plugin] FOREIGN KEY([DependencyId])
124REFERENCES [dbo].[Plugin] ([Id])
125GO
126
127ALTER TABLE [dbo].[Dependencies] CHECK CONSTRAINT [FK_Dependencies_Plugin]
128GO
129
130ALTER TABLE [dbo].[Dependencies]  WITH CHECK ADD  CONSTRAINT [FK_Dependencies_Plugin2] FOREIGN KEY([PluginId])
131REFERENCES [dbo].[Plugin] ([Id])
132GO
133
134ALTER TABLE [dbo].[Dependencies] CHECK CONSTRAINT [FK_Dependencies_Plugin2]
135GO
136
137
138USE [HeuristicLab.PluginStore]
139GO
140
141/****** Object:  Table [dbo].[Plugin]    Script Date: 02/08/2010 19:02:48 ******/
142SET ANSI_NULLS ON
143GO
144
145SET QUOTED_IDENTIFIER ON
146GO
147
148CREATE TABLE [dbo].[Plugin](
149  [Id] [bigint] IDENTITY(1,1) NOT NULL,
150  [Name] [nvarchar](300) NOT NULL,
151  [Version] [nvarchar](50) NOT NULL,
152 CONSTRAINT [PK_Plugin] PRIMARY KEY CLUSTERED
153(
154  [Id] ASC
155)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
156 CONSTRAINT [IX_Plugin_NameVersion] UNIQUE NONCLUSTERED
157(
158  [Name] ASC,
159  [Version] ASC
160)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
161) ON [PRIMARY]
162
163GO
164
165
166USE [HeuristicLab.PluginStore]
167GO
168
169/****** Object:  Table [dbo].[PluginPackage]    Script Date: 02/08/2010 19:02:53 ******/
170SET ANSI_NULLS ON
171GO
172
173SET QUOTED_IDENTIFIER ON
174GO
175
176CREATE TABLE [dbo].[PluginPackage](
177  [PluginId] [bigint] NOT NULL,
178  [FileName] [text] NOT NULL,
179  [Data] [image] NOT NULL,
180 CONSTRAINT [PK_PluginPackage] PRIMARY KEY CLUSTERED
181(
182  [PluginId] ASC
183)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
184) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
185
186GO
187
188ALTER TABLE [dbo].[PluginPackage]  WITH CHECK ADD  CONSTRAINT [FK_PluginPackage_Plugin] FOREIGN KEY([PluginId])
189REFERENCES [dbo].[Plugin] ([Id])
190GO
191
192ALTER TABLE [dbo].[PluginPackage] CHECK CONSTRAINT [FK_PluginPackage_Plugin]
193GO
194
195
196
197USE [HeuristicLab.PluginStore]
198GO
199
200/****** Object:  Table [dbo].[Product]    Script Date: 02/08/2010 19:02:56 ******/
201SET ANSI_NULLS ON
202GO
203
204SET QUOTED_IDENTIFIER ON
205GO
206
207CREATE TABLE [dbo].[Product](
208  [Id] [bigint] IDENTITY(1,1) NOT NULL,
209  [Name] [nvarchar](300) NOT NULL,
210  [Version] [nvarchar](50) NOT NULL,
211 CONSTRAINT [PK_Product] PRIMARY KEY CLUSTERED
212(
213  [Id] ASC
214)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
215 CONSTRAINT [IX_Product_NameVersion] UNIQUE NONCLUSTERED
216(
217  [Name] ASC,
218  [Version] ASC
219)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
220) ON [PRIMARY]
221
222GO
223
224
225USE [HeuristicLab.PluginStore]
226GO
227
228/****** Object:  Table [dbo].[ProductPlugin]    Script Date: 02/08/2010 19:03:01 ******/
229SET ANSI_NULLS ON
230GO
231
232SET QUOTED_IDENTIFIER ON
233GO
234
235CREATE TABLE [dbo].[ProductPlugin](
236  [ProductId] [bigint] NOT NULL,
237  [PluginId] [bigint] NOT NULL,
238 CONSTRAINT [PK_ProductPlugin] PRIMARY KEY CLUSTERED
239(
240  [ProductId] ASC,
241  [PluginId] ASC
242)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
243) ON [PRIMARY]
244
245GO
246
247ALTER TABLE [dbo].[ProductPlugin]  WITH CHECK ADD  CONSTRAINT [FK_ProductPlugin_Plugin] FOREIGN KEY([PluginId])
248REFERENCES [dbo].[Plugin] ([Id])
249GO
250
251ALTER TABLE [dbo].[ProductPlugin] CHECK CONSTRAINT [FK_ProductPlugin_Plugin]
252GO
253
254ALTER TABLE [dbo].[ProductPlugin]  WITH CHECK ADD  CONSTRAINT [FK_ProductPlugin_Product] FOREIGN KEY([ProductId])
255REFERENCES [dbo].[Product] ([Id])
256GO
257
258ALTER TABLE [dbo].[ProductPlugin] CHECK CONSTRAINT [FK_ProductPlugin_Product]
259GO
260
261
Note: See TracBrowser for help on using the repository browser.