Changeset 3180
- Timestamp:
- 03/22/10 16:54:45 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.Deployment.DataAccess/3.3/CreateDeploymentServiceDatabase.sql
r3086 r3180 1 USE [ master]1 USE [HeuristicLab.Deployment] 2 2 GO 3 4 /****** Object: Database [HeuristicLab.PluginStore] Script Date: 02/08/2010 19:01:45 ******/ 5 CREATE 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%) 3 /****** Object: User [DeploymentService] Script Date: 03/22/2010 15:57:21 ******/ 4 CREATE USER [DeploymentService] FOR LOGIN [SERVDEV\DeploymentService] WITH DEFAULT_SCHEMA=[dbo] 9 5 GO 10 11 ALTER DATABASE [HeuristicLab.PluginStore] SET COMPATIBILITY_LEVEL = 90 12 GO 13 14 IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')) 15 begin 16 EXEC [HeuristicLab.PluginStore].[dbo].[sp_fulltext_database] @action = 'enable' 17 end 18 GO 19 20 ALTER DATABASE [HeuristicLab.PluginStore] SET ANSI_NULL_DEFAULT OFF 21 GO 22 23 ALTER DATABASE [HeuristicLab.PluginStore] SET ANSI_NULLS OFF 24 GO 25 26 ALTER DATABASE [HeuristicLab.PluginStore] SET ANSI_PADDING OFF 27 GO 28 29 ALTER DATABASE [HeuristicLab.PluginStore] SET ANSI_WARNINGS OFF 30 GO 31 32 ALTER DATABASE [HeuristicLab.PluginStore] SET ARITHABORT OFF 33 GO 34 35 ALTER DATABASE [HeuristicLab.PluginStore] SET AUTO_CLOSE OFF 36 GO 37 38 ALTER DATABASE [HeuristicLab.PluginStore] SET AUTO_CREATE_STATISTICS ON 39 GO 40 41 ALTER DATABASE [HeuristicLab.PluginStore] SET AUTO_SHRINK OFF 42 GO 43 44 ALTER DATABASE [HeuristicLab.PluginStore] SET AUTO_UPDATE_STATISTICS ON 45 GO 46 47 ALTER DATABASE [HeuristicLab.PluginStore] SET CURSOR_CLOSE_ON_COMMIT OFF 48 GO 49 50 ALTER DATABASE [HeuristicLab.PluginStore] SET CURSOR_DEFAULT GLOBAL 51 GO 52 53 ALTER DATABASE [HeuristicLab.PluginStore] SET CONCAT_NULL_YIELDS_NULL OFF 54 GO 55 56 ALTER DATABASE [HeuristicLab.PluginStore] SET NUMERIC_ROUNDABORT OFF 57 GO 58 59 ALTER DATABASE [HeuristicLab.PluginStore] SET QUOTED_IDENTIFIER OFF 60 GO 61 62 ALTER DATABASE [HeuristicLab.PluginStore] SET RECURSIVE_TRIGGERS OFF 63 GO 64 65 ALTER DATABASE [HeuristicLab.PluginStore] SET DISABLE_BROKER 66 GO 67 68 ALTER DATABASE [HeuristicLab.PluginStore] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 69 GO 70 71 ALTER DATABASE [HeuristicLab.PluginStore] SET DATE_CORRELATION_OPTIMIZATION OFF 72 GO 73 74 ALTER DATABASE [HeuristicLab.PluginStore] SET TRUSTWORTHY OFF 75 GO 76 77 ALTER DATABASE [HeuristicLab.PluginStore] SET ALLOW_SNAPSHOT_ISOLATION OFF 78 GO 79 80 ALTER DATABASE [HeuristicLab.PluginStore] SET PARAMETERIZATION SIMPLE 81 GO 82 83 ALTER DATABASE [HeuristicLab.PluginStore] SET READ_COMMITTED_SNAPSHOT OFF 84 GO 85 86 ALTER DATABASE [HeuristicLab.PluginStore] SET READ_WRITE 87 GO 88 89 ALTER DATABASE [HeuristicLab.PluginStore] SET RECOVERY SIMPLE 90 GO 91 92 ALTER DATABASE [HeuristicLab.PluginStore] SET MULTI_USER 93 GO 94 95 ALTER DATABASE [HeuristicLab.PluginStore] SET PAGE_VERIFY CHECKSUM 96 GO 97 98 ALTER DATABASE [HeuristicLab.PluginStore] SET DB_CHAINING OFF 99 GO 100 101 USE [HeuristicLab.PluginStore] 102 GO 103 104 /****** Object: Table [dbo].[Dependencies] Script Date: 02/08/2010 19:02:19 ******/ 6 /****** Object: Table [dbo].[Plugin] Script Date: 03/22/2010 15:57:25 ******/ 105 7 SET ANSI_NULLS ON 106 8 GO 107 108 9 SET QUOTED_IDENTIFIER ON 109 10 GO 110 111 CREATE TABLE [dbo].[Dependencies](112 [PluginId] [bigint] NOT NULL,113 [DependencyId] [bigint] NOT NULL,114 CONSTRAINT [PK_Dependencies] PRIMARY KEY CLUSTERED115 (116 [PluginId] ASC,117 [DependencyId] ASC118 )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 121 GO122 123 ALTER TABLE [dbo].[Dependencies] WITH CHECK ADD CONSTRAINT [FK_Dependencies_Plugin] FOREIGN KEY([DependencyId])124 REFERENCES [dbo].[Plugin] ([Id])125 GO126 127 ALTER TABLE [dbo].[Dependencies] CHECK CONSTRAINT [FK_Dependencies_Plugin]128 GO129 130 ALTER TABLE [dbo].[Dependencies] WITH CHECK ADD CONSTRAINT [FK_Dependencies_Plugin2] FOREIGN KEY([PluginId])131 REFERENCES [dbo].[Plugin] ([Id])132 GO133 134 ALTER TABLE [dbo].[Dependencies] CHECK CONSTRAINT [FK_Dependencies_Plugin2]135 GO136 137 138 USE [HeuristicLab.PluginStore]139 GO140 141 /****** Object: Table [dbo].[Plugin] Script Date: 02/08/2010 19:02:48 ******/142 SET ANSI_NULLS ON143 GO144 145 SET QUOTED_IDENTIFIER ON146 GO147 148 11 CREATE TABLE [dbo].[Plugin]( 149 12 [Id] [bigint] IDENTITY(1,1) NOT NULL, 150 13 [Name] [nvarchar](300) NOT NULL, 151 14 [Version] [nvarchar](50) NOT NULL, 15 [ContactName] [text] NULL, 16 [ContactEmail] [text] NULL, 17 [License] [text] NULL, 152 18 CONSTRAINT [PK_Plugin] PRIMARY KEY CLUSTERED 153 19 ( … … 159 25 [Version] ASC 160 26 )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 27 ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] 163 28 GO 164 165 166 USE [HeuristicLab.PluginStore] 167 GO 168 169 /****** Object: Table [dbo].[PluginPackage] Script Date: 02/08/2010 19:02:53 ******/ 29 /****** Object: Table [dbo].[Product] Script Date: 03/22/2010 15:57:25 ******/ 170 30 SET ANSI_NULLS ON 171 31 GO 172 173 32 SET QUOTED_IDENTIFIER ON 174 33 GO 175 176 CREATE TABLE [dbo].[PluginPackage](177 [PluginId] [bigint] NOT NULL,178 [FileName] [text] NOT NULL,179 [Data] [image] NOT NULL,180 CONSTRAINT [PK_PluginPackage] PRIMARY KEY CLUSTERED181 (182 [PluginId] ASC183 )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 186 GO187 188 ALTER TABLE [dbo].[PluginPackage] WITH CHECK ADD CONSTRAINT [FK_PluginPackage_Plugin] FOREIGN KEY([PluginId])189 REFERENCES [dbo].[Plugin] ([Id])190 GO191 192 ALTER TABLE [dbo].[PluginPackage] CHECK CONSTRAINT [FK_PluginPackage_Plugin]193 GO194 195 196 197 USE [HeuristicLab.PluginStore]198 GO199 200 /****** Object: Table [dbo].[Product] Script Date: 02/08/2010 19:02:56 ******/201 SET ANSI_NULLS ON202 GO203 204 SET QUOTED_IDENTIFIER ON205 GO206 207 34 CREATE TABLE [dbo].[Product]( 208 35 [Id] [bigint] IDENTITY(1,1) NOT NULL, … … 219 46 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 220 47 ) ON [PRIMARY] 221 222 48 GO 223 224 225 USE [HeuristicLab.PluginStore] 226 GO 227 228 /****** Object: Table [dbo].[ProductPlugin] Script Date: 02/08/2010 19:03:01 ******/ 49 /****** Object: Table [dbo].[ProductPlugin] Script Date: 03/22/2010 15:57:25 ******/ 229 50 SET ANSI_NULLS ON 230 51 GO 231 232 52 SET QUOTED_IDENTIFIER ON 233 53 GO 234 235 54 CREATE TABLE [dbo].[ProductPlugin]( 236 55 [ProductId] [bigint] NOT NULL, … … 242 61 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 243 62 ) ON [PRIMARY] 244 245 63 GO 246 64 /****** Object: Table [dbo].[PluginPackage] Script Date: 03/22/2010 15:57:25 ******/ 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/22/2010 15:57:25 ******/ 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/22/2010 15:57:25 ******/ 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/22/2010 15:57:25 ******/ 247 99 ALTER TABLE [dbo].[ProductPlugin] WITH CHECK ADD CONSTRAINT [FK_ProductPlugin_Plugin] FOREIGN KEY([PluginId]) 248 100 REFERENCES [dbo].[Plugin] ([Id]) 249 101 GO 250 251 102 ALTER TABLE [dbo].[ProductPlugin] CHECK CONSTRAINT [FK_ProductPlugin_Plugin] 252 103 GO 253 104 /****** Object: ForeignKey [FK_ProductPlugin_Product] Script Date: 03/22/2010 15:57:25 ******/ 254 105 ALTER TABLE [dbo].[ProductPlugin] WITH CHECK ADD CONSTRAINT [FK_ProductPlugin_Product] FOREIGN KEY([ProductId]) 255 106 REFERENCES [dbo].[Product] ([Id]) 256 107 GO 257 258 108 ALTER TABLE [dbo].[ProductPlugin] CHECK CONSTRAINT [FK_ProductPlugin_Product] 259 109 GO 260 261 110 /****** Object: ForeignKey [FK_PluginPackage_Plugin] Script Date: 03/22/2010 15:57:25 ******/ 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/22/2010 15:57:25 ******/ 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/22/2010 15:57:25 ******/ 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
Note: See TracChangeset
for help on using the changeset viewer.