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