Changeset 6825 for branches/ClientUserManagement/HeuristicLab.Services.Access.DataAccess/3.3/SQL Scripts
- Timestamp:
- 09/23/11 20:13:55 (13 years ago)
- Location:
- branches/ClientUserManagement
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClientUserManagement
- Property svn:ignore
-
old new 1 1 *.suo 2 *.testsettings 3 HeuristicLab.Services.Access.vsmdi
-
- Property svn:ignore
-
branches/ClientUserManagement/HeuristicLab.Services.Access.DataAccess/3.3/SQL Scripts/Initialize ClientManagement.sql
r6820 r6825 2 2 GO 3 3 4 /****** Object: Table [dbo].[Resource] Script Date: 09/2 2/2011 12:53:30******/4 /****** Object: Table [dbo].[Resource] Script Date: 09/23/2011 17:55:12 ******/ 5 5 SET ANSI_NULLS ON 6 6 GO … … 16 16 [ProcessorType] [nvarchar](max) NULL, 17 17 [NumberOfCores] [int] NULL, 18 [IPAddress] [nvarchar](max) NULL,19 18 [MemorySize] [int] NULL, 20 [OperatingSystem] [ nvarchar](max)NULL,21 [Country] [ nvarchar](max)NULL,19 [OperatingSystem] [uniqueidentifier] NULL, 20 [Country] [uniqueidentifier] NULL, 22 21 [HeuristicLabVersion] [nvarchar](max) NULL, 23 [ClientType] [nvarchar](max) NULL, 22 [ClientType] [uniqueidentifier] NULL, 23 [ClientConfiguration] [uniqueidentifier] NULL, 24 [Timestamp] [datetime] NULL, 24 25 CONSTRAINT [PK_Resource] PRIMARY KEY CLUSTERED 25 26 ( … … 29 30 30 31 GO 31 /****** Object: Table [dbo].[ResourceResourceGroup] Script Date: 09/22/2011 12:53:47 ******/ 32 33 ALTER TABLE [dbo].[Resource] WITH CHECK ADD CONSTRAINT [FK_Resource_ClientConfiguration] FOREIGN KEY([ClientConfiguration]) 34 REFERENCES [dbo].[ClientConfiguration] ([Id]) 35 GO 36 37 ALTER TABLE [dbo].[Resource] CHECK CONSTRAINT [FK_Resource_ClientConfiguration] 38 GO 39 40 ALTER TABLE [dbo].[Resource] WITH CHECK ADD CONSTRAINT [FK_Resource_ClientType] FOREIGN KEY([ClientType]) 41 REFERENCES [dbo].[ClientType] ([Id]) 42 GO 43 44 ALTER TABLE [dbo].[Resource] CHECK CONSTRAINT [FK_Resource_ClientType] 45 GO 46 47 ALTER TABLE [dbo].[Resource] WITH CHECK ADD CONSTRAINT [FK_Resource_Country] FOREIGN KEY([Country]) 48 REFERENCES [dbo].[Country] ([Id]) 49 GO 50 51 ALTER TABLE [dbo].[Resource] CHECK CONSTRAINT [FK_Resource_Country] 52 GO 53 54 ALTER TABLE [dbo].[Resource] WITH CHECK ADD CONSTRAINT [FK_Resource_OperatingSystem] FOREIGN KEY([OperatingSystem]) 55 REFERENCES [dbo].[OperatingSystem] ([Id]) 56 GO 57 58 ALTER TABLE [dbo].[Resource] CHECK CONSTRAINT [FK_Resource_OperatingSystem] 59 GO 60 61 ALTER TABLE [dbo].[Resource] ADD CONSTRAINT [DF_Resource_Id] DEFAULT (newsequentialid()) FOR [Id] 62 GO 63 64 65 /****** Object: Table [dbo].[ResourceResourceGroup] Script Date: 09/23/2011 13:34:10 ******/ 32 66 SET ANSI_NULLS ON 33 67 GO … … 60 94 61 95 ALTER TABLE [dbo].[ResourceResourceGroup] CHECK CONSTRAINT [FK_ResourceResourceGroup_ResourceId] 62 63 /****** Object: Table [dbo].[ClientLog] Script Date: 09/22/2011 12:54:07 ******/ 96 GO 97 98 99 /****** Object: Table [dbo].[Plugin] Script Date: 09/23/2011 13:34:39 ******/ 100 SET ANSI_NULLS ON 101 GO 102 103 SET QUOTED_IDENTIFIER ON 104 GO 105 106 CREATE TABLE [dbo].[Plugin]( 107 [Id] [uniqueidentifier] NOT NULL, 108 [Name] [nvarchar](max) NOT NULL, 109 [StrongName] [nvarchar](max) NULL, 110 [Version] [nvarchar](20) NOT NULL, 111 CONSTRAINT [PK_Plugin] PRIMARY KEY CLUSTERED 112 ( 113 [Id] ASC 114 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 115 ) ON [PRIMARY] 116 117 GO 118 119 /****** Object: Table [dbo].[ResourcePlugin] Script Date: 09/23/2011 13:34:53 ******/ 120 SET ANSI_NULLS ON 121 GO 122 123 SET QUOTED_IDENTIFIER ON 124 GO 125 126 CREATE TABLE [dbo].[ResourcePlugin]( 127 [ResourceId] [uniqueidentifier] NOT NULL, 128 [PluginId] [uniqueidentifier] NOT NULL, 129 CONSTRAINT [PK_ResourcePlugin] PRIMARY KEY CLUSTERED 130 ( 131 [ResourceId] ASC, 132 [PluginId] ASC 133 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 134 ) ON [PRIMARY] 135 136 GO 137 138 ALTER TABLE [dbo].[ResourcePlugin] WITH CHECK ADD CONSTRAINT [FK_ResourcePlugin_Plugin] FOREIGN KEY([PluginId]) 139 REFERENCES [dbo].[Plugin] ([Id]) 140 GO 141 142 ALTER TABLE [dbo].[ResourcePlugin] CHECK CONSTRAINT [FK_ResourcePlugin_Plugin] 143 GO 144 145 ALTER TABLE [dbo].[ResourcePlugin] WITH CHECK ADD CONSTRAINT [FK_ResourcePlugin_Resource] FOREIGN KEY([ResourceId]) 146 REFERENCES [dbo].[Resource] ([Id]) 147 GO 148 149 ALTER TABLE [dbo].[ResourcePlugin] CHECK CONSTRAINT [FK_ResourcePlugin_Resource] 150 GO 151 152 153 /****** Object: Table [dbo].[UserGroup] Script Date: 09/23/2011 13:35:16 ******/ 154 SET ANSI_NULLS ON 155 GO 156 157 SET QUOTED_IDENTIFIER ON 158 GO 159 160 CREATE TABLE [dbo].[UserGroup]( 161 [Id] [uniqueidentifier] NOT NULL, 162 [FullName] [nvarchar](max) NULL, 163 [Name] [nvarchar](max) NULL, 164 [Type] [nvarchar](10) NOT NULL, 165 CONSTRAINT [PK_UserGroup] PRIMARY KEY CLUSTERED 166 ( 167 [Id] ASC 168 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 169 ) ON [PRIMARY] 170 171 GO 172 173 174 175 /****** Object: Table [dbo].[UserGroupUserGroup] Script Date: 09/23/2011 14:24:45 ******/ 176 SET ANSI_NULLS ON 177 GO 178 179 SET QUOTED_IDENTIFIER ON 180 GO 181 182 CREATE TABLE [dbo].[UserGroupUserGroup]( 183 [UserGroupId] [uniqueidentifier] NOT NULL, 184 [UserGroupUserGroupId] [uniqueidentifier] NOT NULL, 185 CONSTRAINT [PK_UserGroupUserGroup] PRIMARY KEY CLUSTERED 186 ( 187 [UserGroupId] ASC, 188 [UserGroupUserGroupId] ASC 189 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 190 ) ON [PRIMARY] 191 192 GO 193 194 ALTER TABLE [dbo].[UserGroupUserGroup] WITH CHECK ADD CONSTRAINT [FK_UserGroupUserGroup_UserGroup] FOREIGN KEY([UserGroupId]) 195 REFERENCES [dbo].[UserGroup] ([Id]) 196 GO 197 198 ALTER TABLE [dbo].[UserGroupUserGroup] CHECK CONSTRAINT [FK_UserGroupUserGroup_UserGroup] 199 GO 200 201 ALTER TABLE [dbo].[UserGroupUserGroup] WITH CHECK ADD CONSTRAINT [FK_UserGroupUserGroup_UserGroup1] FOREIGN KEY([UserGroupUserGroupId]) 202 REFERENCES [dbo].[UserGroup] ([Id]) 203 GO 204 205 ALTER TABLE [dbo].[UserGroupUserGroup] CHECK CONSTRAINT [FK_UserGroupUserGroup_UserGroup1] 206 GO 207 208 209 210 211 /****** Object: Table [dbo].[OperatingSystem] Script Date: 09/23/2011 13:36:01 ******/ 212 SET ANSI_NULLS ON 213 GO 214 215 SET QUOTED_IDENTIFIER ON 216 GO 217 218 CREATE TABLE [dbo].[OperatingSystem]( 219 [Id] [uniqueidentifier] NOT NULL, 220 [Name] [nvarchar](max) NOT NULL, 221 CONSTRAINT [PK_OperatingSystem] PRIMARY KEY CLUSTERED 222 ( 223 [Id] ASC 224 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 225 ) ON [PRIMARY] 226 227 GO 228 229 230 231 /****** Object: Table [dbo].[Country] Script Date: 09/23/2011 13:36:11 ******/ 232 SET ANSI_NULLS ON 233 GO 234 235 SET QUOTED_IDENTIFIER ON 236 GO 237 238 CREATE TABLE [dbo].[Country]( 239 [Id] [uniqueidentifier] NOT NULL, 240 [Name] [nvarchar](max) NOT NULL, 241 CONSTRAINT [PK_Country] PRIMARY KEY CLUSTERED 242 ( 243 [Id] ASC 244 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 245 ) ON [PRIMARY] 246 247 GO 248 249 250 /****** Object: Table [dbo].[ClientType] Script Date: 09/23/2011 13:36:24 ******/ 251 SET ANSI_NULLS ON 252 GO 253 254 SET QUOTED_IDENTIFIER ON 255 GO 256 257 CREATE TABLE [dbo].[ClientType]( 258 [Id] [uniqueidentifier] NOT NULL, 259 [Name] [nvarchar](max) NOT NULL, 260 CONSTRAINT [PK_ClientType] PRIMARY KEY CLUSTERED 261 ( 262 [Id] ASC 263 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 264 ) ON [PRIMARY] 265 266 GO 267 268 /****** Object: Table [dbo].[ClientLog] Script Date: 09/23/2011 13:36:35 ******/ 64 269 SET ANSI_NULLS ON 65 270 GO … … 72 277 [ResourceId] [uniqueidentifier] NOT NULL, 73 278 [Message] [nvarchar](max) NULL, 74 [Exception] [nvarchar](max) NULL,75 279 CONSTRAINT [PK_ClientLog] PRIMARY KEY CLUSTERED 76 280 ( … … 89 293 GO 90 294 91 /****** Object: Table [dbo].[User] Script Date: 09/22/2011 12:54:23 ******/ 92 SET ANSI_NULLS ON 93 GO 94 95 SET QUOTED_IDENTIFIER ON 96 GO 97 98 CREATE TABLE [dbo].[User]( 99 [Id] [uniqueidentifier] NOT NULL, 100 [FullName] [nvarchar](max) NULL, 101 CONSTRAINT [PK_User] PRIMARY KEY CLUSTERED 102 ( 103 [Id] ASC 104 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 105 ) ON [PRIMARY] 106 107 GO 108 109 /****** Object: Table [dbo].[UserGroup] Script Date: 09/22/2011 12:54:35 ******/ 110 SET ANSI_NULLS ON 111 GO 112 113 SET QUOTED_IDENTIFIER ON 114 GO 115 116 CREATE TABLE [dbo].[UserGroup]( 117 [Id] [uniqueidentifier] NOT NULL, 118 [Name] [nvarchar](max) NOT NULL, 119 [ParentUserGroup] [uniqueidentifier] NULL, 120 CONSTRAINT [PK_UserGroup] PRIMARY KEY CLUSTERED 121 ( 122 [Id] ASC 123 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 124 ) ON [PRIMARY] 125 126 GO 127 128 /****** Object: Table [dbo].[UserUserGroup] Script Date: 09/22/2011 12:54:52 ******/ 129 SET ANSI_NULLS ON 130 GO 131 132 SET QUOTED_IDENTIFIER ON 133 GO 134 135 CREATE TABLE [dbo].[UserUserGroup]( 136 [UserId] [uniqueidentifier] NOT NULL, 137 [UserGroupId] [uniqueidentifier] NOT NULL, 138 CONSTRAINT [PK_UserUserGroup] PRIMARY KEY CLUSTERED 139 ( 140 [UserId] ASC, 141 [UserGroupId] ASC 142 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 143 ) ON [PRIMARY] 144 145 GO 146 147 ALTER TABLE [dbo].[UserUserGroup] WITH CHECK ADD CONSTRAINT [FK_UserUserGroup_User] FOREIGN KEY([UserId]) 148 REFERENCES [dbo].[User] ([Id]) 149 GO 150 151 ALTER TABLE [dbo].[UserUserGroup] CHECK CONSTRAINT [FK_UserUserGroup_User] 152 GO 153 154 ALTER TABLE [dbo].[UserUserGroup] WITH CHECK ADD CONSTRAINT [FK_UserUserGroup_UserGroup] FOREIGN KEY([UserGroupId]) 295 USE [HeuristicLab.ClientManagement] 296 GO 297 298 /****** Object: Table [dbo].[ClientError] Script Date: 09/23/2011 13:36:46 ******/ 299 SET ANSI_NULLS ON 300 GO 301 302 SET QUOTED_IDENTIFIER ON 303 GO 304 305 CREATE TABLE [dbo].[ClientError]( 306 [Id] [uniqueidentifier] NOT NULL, 307 [Timestamp] [datetime] NOT NULL, 308 [Exception] [nvarchar](max) NULL, 309 [UserComment] [nvarchar](max) NULL, 310 [ConfigDump] [nvarchar](max) NULL, 311 [ClientId] [uniqueidentifier] NULL, 312 [UserId] [uniqueidentifier] NULL, 313 CONSTRAINT [PK_ClientError] PRIMARY KEY CLUSTERED 314 ( 315 [Id] ASC 316 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 317 ) ON [PRIMARY] 318 319 GO 320 321 ALTER TABLE [dbo].[ClientError] WITH CHECK ADD CONSTRAINT [FK_ClientError_Resource] FOREIGN KEY([ClientId]) 322 REFERENCES [dbo].[Resource] ([Id]) 323 GO 324 325 ALTER TABLE [dbo].[ClientError] CHECK CONSTRAINT [FK_ClientError_Resource] 326 GO 327 328 ALTER TABLE [dbo].[ClientError] WITH CHECK ADD CONSTRAINT [FK_ClientError_UserGroup] FOREIGN KEY([UserId]) 155 329 REFERENCES [dbo].[UserGroup] ([Id]) 156 330 GO 157 331 158 ALTER TABLE [dbo].[UserUserGroup] CHECK CONSTRAINT [FK_UserUserGroup_UserGroup] 159 GO 332 ALTER TABLE [dbo].[ClientError] CHECK CONSTRAINT [FK_ClientError_UserGroup] 333 GO 334 335 /****** Object: Table [dbo].[ClientConfiguration] Script Date: 09/23/2011 13:36:55 ******/ 336 SET ANSI_NULLS ON 337 GO 338 339 SET QUOTED_IDENTIFIER ON 340 GO 341 342 CREATE TABLE [dbo].[ClientConfiguration]( 343 [Id] [uniqueidentifier] NOT NULL, 344 [Hash] [nvarchar](max) NOT NULL, 345 [Description] [nvarchar](max) NULL, 346 CONSTRAINT [PK_ClientConfiguration] PRIMARY KEY CLUSTERED 347 ( 348 [Id] ASC 349 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 350 ) ON [PRIMARY] 351 352 GO
Note: See TracChangeset
for help on using the changeset viewer.