Changeset 9546 for branches/HiveStatistics/sources
- Timestamp:
- 05/28/13 10:30:43 (12 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
r9541 r9546 277 277 <Column Name="ClientId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 278 278 <Column Name="Time" Type="System.DateTime" DbType="DateTime NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 279 <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier NULL" CanBeNull="true" />279 <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier NULL" IsPrimaryKey="true" CanBeNull="false" /> 280 280 <Column Name="NumUsedCores" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" /> 281 281 <Column Name="NumTotalCores" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" /> -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
r9541 r9546 5929 5929 private System.DateTime _Time; 5930 5930 5931 private System. Nullable<System.Guid>_UserId;5931 private System.Guid _UserId; 5932 5932 5933 5933 private int _NumUsedCores; … … 5969 5969 partial void OnTimeChanging(System.DateTime value); 5970 5970 partial void OnTimeChanged(); 5971 partial void OnUserIdChanging(System. Nullable<System.Guid>value);5971 partial void OnUserIdChanging(System.Guid value); 5972 5972 partial void OnUserIdChanged(); 5973 5973 partial void OnNumUsedCoresChanging(int value); … … 6053 6053 } 6054 6054 6055 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NULL" )]6056 public System. Nullable<System.Guid>UserId6055 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NULL", IsPrimaryKey=true)] 6056 public System.Guid UserId 6057 6057 { 6058 6058 get … … 6412 6412 else 6413 6413 { 6414 this._UserId = default( Nullable<System.Guid>);6414 this._UserId = default(System.Guid); 6415 6415 } 6416 6416 this.SendPropertyChanged("DimUser"); -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql
r9541 r9546 233 233 [ClientId] UNIQUEIDENTIFIER NOT NULL, 234 234 [Time] DATETIME NOT NULL, 235 [UserId] UNIQUEIDENTIFIER N ULL,235 [UserId] UNIQUEIDENTIFIER NOT NULL, 236 236 [NumUsedCores] INT NOT NULL, 237 237 [NumTotalCores] INT NOT NULL, … … 246 246 [TotalTimeOffline] FLOAT (53) NOT NULL, 247 247 [TotalTimeUnavailable] FLOAT (53) NOT NULL, 248 CONSTRAINT [PK_FactClientInfo] PRIMARY KEY CLUSTERED ([ClientId] ASC, [Time] ASC ),248 CONSTRAINT [PK_FactClientInfo] PRIMARY KEY CLUSTERED ([ClientId] ASC, [Time] ASC, [UserId] ASC), 249 249 CONSTRAINT [FK_FactClientInfo_DimTime] FOREIGN KEY ([Time]) REFERENCES [statistics].[DimTime] ([Time]), 250 250 CONSTRAINT [FK_FactClientInfo_DimClient] FOREIGN KEY ([ClientId]) REFERENCES [statistics].[DimClient] ([Id]), -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveStatisticsGenerator.cs
r9545 r9546 92 92 93 93 db.DimUsers.InsertAllOnSubmit(newDimUsers); 94 95 // insert NULL-User 96 if (!db.DimUsers.Any(x => x.UserId == Guid.Empty)) { 97 db.DimUsers.InsertOnSubmit(new DimUser { UserId = Guid.Empty, Name = "NULL" }); 98 } 94 99 } 95 100 … … 168 173 DimClient = s.Client, 169 174 DimTime = newTime, 170 UserId = s.Slave.OwnerUserId ,175 UserId = s.Slave.OwnerUserId ?? Guid.Empty, 171 176 NumUsedCores = 172 177 s.Slave.Cores != null && s.Slave.FreeCores != null
Note: See TracChangeset
for help on using the changeset viewer.