Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/23/11 20:13:55 (13 years ago)
Author:
ascheibe
Message:

#1648 updated the database scheme and dto's

Location:
branches/ClientUserManagement
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ClientUserManagement

    • Property svn:ignore
      •  

        old new  
        11*.suo
         2*.testsettings
         3HeuristicLab.Services.Access.vsmdi
  • branches/ClientUserManagement/HeuristicLab.Services.Access.DataAccess/3.3/SQL Scripts/Initialize ClientManagement.sql

    r6820 r6825  
    22GO
    33
    4 /****** Object:  Table [dbo].[Resource]    Script Date: 09/22/2011 12:53:30 ******/
     4/****** Object:  Table [dbo].[Resource]    Script Date: 09/23/2011 17:55:12 ******/
    55SET ANSI_NULLS ON
    66GO
     
    1616  [ProcessorType] [nvarchar](max) NULL,
    1717  [NumberOfCores] [int] NULL,
    18   [IPAddress] [nvarchar](max) NULL,
    1918  [MemorySize] [int] NULL,
    20   [OperatingSystem] [nvarchar](max) NULL,
    21   [Country] [nvarchar](max) NULL,
     19  [OperatingSystem] [uniqueidentifier] NULL,
     20  [Country] [uniqueidentifier] NULL,
    2221  [HeuristicLabVersion] [nvarchar](max) NULL,
    23   [ClientType] [nvarchar](max) NULL,
     22  [ClientType] [uniqueidentifier] NULL,
     23  [ClientConfiguration] [uniqueidentifier] NULL,
     24  [Timestamp] [datetime] NULL,
    2425 CONSTRAINT [PK_Resource] PRIMARY KEY CLUSTERED
    2526(
     
    2930
    3031GO
    31 /****** Object:  Table [dbo].[ResourceResourceGroup]    Script Date: 09/22/2011 12:53:47 ******/
     32
     33ALTER TABLE [dbo].[Resource]  WITH CHECK ADD  CONSTRAINT [FK_Resource_ClientConfiguration] FOREIGN KEY([ClientConfiguration])
     34REFERENCES [dbo].[ClientConfiguration] ([Id])
     35GO
     36
     37ALTER TABLE [dbo].[Resource] CHECK CONSTRAINT [FK_Resource_ClientConfiguration]
     38GO
     39
     40ALTER TABLE [dbo].[Resource]  WITH CHECK ADD  CONSTRAINT [FK_Resource_ClientType] FOREIGN KEY([ClientType])
     41REFERENCES [dbo].[ClientType] ([Id])
     42GO
     43
     44ALTER TABLE [dbo].[Resource] CHECK CONSTRAINT [FK_Resource_ClientType]
     45GO
     46
     47ALTER TABLE [dbo].[Resource]  WITH CHECK ADD  CONSTRAINT [FK_Resource_Country] FOREIGN KEY([Country])
     48REFERENCES [dbo].[Country] ([Id])
     49GO
     50
     51ALTER TABLE [dbo].[Resource] CHECK CONSTRAINT [FK_Resource_Country]
     52GO
     53
     54ALTER TABLE [dbo].[Resource]  WITH CHECK ADD  CONSTRAINT [FK_Resource_OperatingSystem] FOREIGN KEY([OperatingSystem])
     55REFERENCES [dbo].[OperatingSystem] ([Id])
     56GO
     57
     58ALTER TABLE [dbo].[Resource] CHECK CONSTRAINT [FK_Resource_OperatingSystem]
     59GO
     60
     61ALTER TABLE [dbo].[Resource] ADD  CONSTRAINT [DF_Resource_Id]  DEFAULT (newsequentialid()) FOR [Id]
     62GO
     63
     64
     65/****** Object:  Table [dbo].[ResourceResourceGroup]    Script Date: 09/23/2011 13:34:10 ******/
    3266SET ANSI_NULLS ON
    3367GO
     
    6094
    6195ALTER TABLE [dbo].[ResourceResourceGroup] CHECK CONSTRAINT [FK_ResourceResourceGroup_ResourceId]
    62 
    63 /****** Object:  Table [dbo].[ClientLog]    Script Date: 09/22/2011 12:54:07 ******/
     96GO
     97
     98
     99/****** Object:  Table [dbo].[Plugin]    Script Date: 09/23/2011 13:34:39 ******/
     100SET ANSI_NULLS ON
     101GO
     102
     103SET QUOTED_IDENTIFIER ON
     104GO
     105
     106CREATE 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
     117GO
     118
     119/****** Object:  Table [dbo].[ResourcePlugin]    Script Date: 09/23/2011 13:34:53 ******/
     120SET ANSI_NULLS ON
     121GO
     122
     123SET QUOTED_IDENTIFIER ON
     124GO
     125
     126CREATE 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
     136GO
     137
     138ALTER TABLE [dbo].[ResourcePlugin]  WITH CHECK ADD  CONSTRAINT [FK_ResourcePlugin_Plugin] FOREIGN KEY([PluginId])
     139REFERENCES [dbo].[Plugin] ([Id])
     140GO
     141
     142ALTER TABLE [dbo].[ResourcePlugin] CHECK CONSTRAINT [FK_ResourcePlugin_Plugin]
     143GO
     144
     145ALTER TABLE [dbo].[ResourcePlugin]  WITH CHECK ADD  CONSTRAINT [FK_ResourcePlugin_Resource] FOREIGN KEY([ResourceId])
     146REFERENCES [dbo].[Resource] ([Id])
     147GO
     148
     149ALTER TABLE [dbo].[ResourcePlugin] CHECK CONSTRAINT [FK_ResourcePlugin_Resource]
     150GO
     151
     152
     153/****** Object:  Table [dbo].[UserGroup]    Script Date: 09/23/2011 13:35:16 ******/
     154SET ANSI_NULLS ON
     155GO
     156
     157SET QUOTED_IDENTIFIER ON
     158GO
     159
     160CREATE 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
     171GO
     172
     173
     174
     175/****** Object:  Table [dbo].[UserGroupUserGroup]    Script Date: 09/23/2011 14:24:45 ******/
     176SET ANSI_NULLS ON
     177GO
     178
     179SET QUOTED_IDENTIFIER ON
     180GO
     181
     182CREATE 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
     192GO
     193
     194ALTER TABLE [dbo].[UserGroupUserGroup]  WITH CHECK ADD  CONSTRAINT [FK_UserGroupUserGroup_UserGroup] FOREIGN KEY([UserGroupId])
     195REFERENCES [dbo].[UserGroup] ([Id])
     196GO
     197
     198ALTER TABLE [dbo].[UserGroupUserGroup] CHECK CONSTRAINT [FK_UserGroupUserGroup_UserGroup]
     199GO
     200
     201ALTER TABLE [dbo].[UserGroupUserGroup]  WITH CHECK ADD  CONSTRAINT [FK_UserGroupUserGroup_UserGroup1] FOREIGN KEY([UserGroupUserGroupId])
     202REFERENCES [dbo].[UserGroup] ([Id])
     203GO
     204
     205ALTER TABLE [dbo].[UserGroupUserGroup] CHECK CONSTRAINT [FK_UserGroupUserGroup_UserGroup1]
     206GO
     207
     208
     209
     210
     211/****** Object:  Table [dbo].[OperatingSystem]    Script Date: 09/23/2011 13:36:01 ******/
     212SET ANSI_NULLS ON
     213GO
     214
     215SET QUOTED_IDENTIFIER ON
     216GO
     217
     218CREATE 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
     227GO
     228
     229
     230
     231/****** Object:  Table [dbo].[Country]    Script Date: 09/23/2011 13:36:11 ******/
     232SET ANSI_NULLS ON
     233GO
     234
     235SET QUOTED_IDENTIFIER ON
     236GO
     237
     238CREATE 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
     247GO
     248
     249
     250/****** Object:  Table [dbo].[ClientType]    Script Date: 09/23/2011 13:36:24 ******/
     251SET ANSI_NULLS ON
     252GO
     253
     254SET QUOTED_IDENTIFIER ON
     255GO
     256
     257CREATE 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
     266GO
     267
     268/****** Object:  Table [dbo].[ClientLog]    Script Date: 09/23/2011 13:36:35 ******/
    64269SET ANSI_NULLS ON
    65270GO
     
    72277  [ResourceId] [uniqueidentifier] NOT NULL,
    73278  [Message] [nvarchar](max) NULL,
    74   [Exception] [nvarchar](max) NULL,
    75279 CONSTRAINT [PK_ClientLog] PRIMARY KEY CLUSTERED
    76280(
     
    89293GO
    90294
    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])
     295USE [HeuristicLab.ClientManagement]
     296GO
     297
     298/****** Object:  Table [dbo].[ClientError]    Script Date: 09/23/2011 13:36:46 ******/
     299SET ANSI_NULLS ON
     300GO
     301
     302SET QUOTED_IDENTIFIER ON
     303GO
     304
     305CREATE 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
     319GO
     320
     321ALTER TABLE [dbo].[ClientError]  WITH CHECK ADD  CONSTRAINT [FK_ClientError_Resource] FOREIGN KEY([ClientId])
     322REFERENCES [dbo].[Resource] ([Id])
     323GO
     324
     325ALTER TABLE [dbo].[ClientError] CHECK CONSTRAINT [FK_ClientError_Resource]
     326GO
     327
     328ALTER TABLE [dbo].[ClientError]  WITH CHECK ADD  CONSTRAINT [FK_ClientError_UserGroup] FOREIGN KEY([UserId])
    155329REFERENCES [dbo].[UserGroup] ([Id])
    156330GO
    157331
    158 ALTER TABLE [dbo].[UserUserGroup] CHECK CONSTRAINT [FK_UserUserGroup_UserGroup]
    159 GO
     332ALTER TABLE [dbo].[ClientError] CHECK CONSTRAINT [FK_ClientError_UserGroup]
     333GO
     334
     335/****** Object:  Table [dbo].[ClientConfiguration]    Script Date: 09/23/2011 13:36:55 ******/
     336SET ANSI_NULLS ON
     337GO
     338
     339SET QUOTED_IDENTIFIER ON
     340GO
     341
     342CREATE 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
     352GO
Note: See TracChangeset for help on using the changeset viewer.