1 | USE [HeuristicLab.Deployment]
|
---|
2 | GO
|
---|
3 | /****** Object: Table [dbo].[Plugin] Script Date: 03/22/2010 15:57:25 ******/
|
---|
4 | SET ANSI_NULLS ON
|
---|
5 | GO
|
---|
6 | SET QUOTED_IDENTIFIER ON
|
---|
7 | GO
|
---|
8 | CREATE 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]
|
---|
25 | GO
|
---|
26 | /****** Object: Table [dbo].[Product] Script Date: 03/22/2010 15:57:25 ******/
|
---|
27 | SET ANSI_NULLS ON
|
---|
28 | GO
|
---|
29 | SET QUOTED_IDENTIFIER ON
|
---|
30 | GO
|
---|
31 | CREATE 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]
|
---|
45 | GO
|
---|
46 | /****** Object: Table [dbo].[ProductPlugin] Script Date: 03/22/2010 15:57:25 ******/
|
---|
47 | SET ANSI_NULLS ON
|
---|
48 | GO
|
---|
49 | SET QUOTED_IDENTIFIER ON
|
---|
50 | GO
|
---|
51 | CREATE 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]
|
---|
60 | GO
|
---|
61 | /****** Object: Table [dbo].[PluginPackage] Script Date: 03/22/2010 15:57:25 ******/
|
---|
62 | SET ANSI_NULLS ON
|
---|
63 | GO
|
---|
64 | SET QUOTED_IDENTIFIER ON
|
---|
65 | GO
|
---|
66 | CREATE 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]
|
---|
74 | GO
|
---|
75 | /****** Object: Table [dbo].[Dependencies] Script Date: 03/22/2010 15:57:25 ******/
|
---|
76 | SET ANSI_NULLS ON
|
---|
77 | GO
|
---|
78 | SET QUOTED_IDENTIFIER ON
|
---|
79 | GO
|
---|
80 | CREATE 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]
|
---|
89 | GO
|
---|
90 | /****** Object: Check [CK_Dependencies] Script Date: 03/22/2010 15:57:25 ******/
|
---|
91 | ALTER TABLE [dbo].[Dependencies] WITH CHECK ADD CONSTRAINT [CK_Dependencies] CHECK (([PluginId]<>[DependencyId]))
|
---|
92 | GO
|
---|
93 | ALTER TABLE [dbo].[Dependencies] CHECK CONSTRAINT [CK_Dependencies]
|
---|
94 | GO
|
---|
95 | /****** Object: ForeignKey [FK_ProductPlugin_Plugin] Script Date: 03/22/2010 15:57:25 ******/
|
---|
96 | ALTER TABLE [dbo].[ProductPlugin] WITH CHECK ADD CONSTRAINT [FK_ProductPlugin_Plugin] FOREIGN KEY([PluginId])
|
---|
97 | REFERENCES [dbo].[Plugin] ([Id])
|
---|
98 | GO
|
---|
99 | ALTER TABLE [dbo].[ProductPlugin] CHECK CONSTRAINT [FK_ProductPlugin_Plugin]
|
---|
100 | GO
|
---|
101 | /****** Object: ForeignKey [FK_ProductPlugin_Product] Script Date: 03/22/2010 15:57:25 ******/
|
---|
102 | ALTER TABLE [dbo].[ProductPlugin] WITH CHECK ADD CONSTRAINT [FK_ProductPlugin_Product] FOREIGN KEY([ProductId])
|
---|
103 | REFERENCES [dbo].[Product] ([Id])
|
---|
104 | GO
|
---|
105 | ALTER TABLE [dbo].[ProductPlugin] CHECK CONSTRAINT [FK_ProductPlugin_Product]
|
---|
106 | GO
|
---|
107 | /****** Object: ForeignKey [FK_PluginPackage_Plugin] Script Date: 03/22/2010 15:57:25 ******/
|
---|
108 | ALTER TABLE [dbo].[PluginPackage] WITH CHECK ADD CONSTRAINT [FK_PluginPackage_Plugin] FOREIGN KEY([PluginId])
|
---|
109 | REFERENCES [dbo].[Plugin] ([Id])
|
---|
110 | GO
|
---|
111 | ALTER TABLE [dbo].[PluginPackage] CHECK CONSTRAINT [FK_PluginPackage_Plugin]
|
---|
112 | GO
|
---|
113 | /****** Object: ForeignKey [FK_Dependencies_Plugin] Script Date: 03/22/2010 15:57:25 ******/
|
---|
114 | ALTER TABLE [dbo].[Dependencies] WITH CHECK ADD CONSTRAINT [FK_Dependencies_Plugin] FOREIGN KEY([DependencyId])
|
---|
115 | REFERENCES [dbo].[Plugin] ([Id])
|
---|
116 | GO
|
---|
117 | ALTER TABLE [dbo].[Dependencies] CHECK CONSTRAINT [FK_Dependencies_Plugin]
|
---|
118 | GO
|
---|
119 | /****** Object: ForeignKey [FK_Dependencies_Plugin2] Script Date: 03/22/2010 15:57:25 ******/
|
---|
120 | ALTER TABLE [dbo].[Dependencies] WITH CHECK ADD CONSTRAINT [FK_Dependencies_Plugin2] FOREIGN KEY([PluginId])
|
---|
121 | REFERENCES [dbo].[Plugin] ([Id])
|
---|
122 | GO
|
---|
123 | ALTER TABLE [dbo].[Dependencies] CHECK CONSTRAINT [FK_Dependencies_Plugin2]
|
---|
124 | GO
|
---|