Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml	(revision 5405)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml	(revision 5511)
@@ -39,4 +39,5 @@
       <Association Name="Resource_Resource" Member="ChildResources" ThisKey="ResourceId" OtherKey="ParentResourceId" Type="Resource" />
       <Association Name="Resource_UptimeCalendar" Member="UptimeCalendars" ThisKey="ResourceId" OtherKey="ResourceId" Type="UptimeCalendar" />
+      <Association Name="Resource_StateLog" Member="StateLogs" ThisKey="ResourceId" OtherKey="SlaveId" Type="StateLog" />
       <Association Name="Resource_Resource" Member="ParentResource" ThisKey="ParentResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" />
       <Type Name="Slave" InheritanceCode="Slave" IsInheritanceDefault="true">
@@ -52,5 +53,4 @@
         <Column Name="OperatingSystem" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" UpdateCheck="Never" />
         <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
-        <Association Name="Slave_Job" Member="Jobs" ThisKey="ResourceId" OtherKey="SlaveId" Type="Job" />
       </Type>
       <Type Name="SlaveGroup" InheritanceCode="GROUP" />
@@ -61,23 +61,16 @@
       <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
       <Column Name="ParentJobId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
-      <Column Name="JobState" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState" DbType="VarChar(15)" CanBeNull="false" />
-      <Column Name="ResourceId" Member="SlaveId" Storage="_ResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
-      <Column Name="ExecutionTime" Type="System.TimeSpan" DbType="Time" CanBeNull="true" />
-      <Column Name="Exception" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" />
-      <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime" CanBeNull="false" />
-      <Column Name="DateCalculated" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
-      <Column Name="DateFinished" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
+      <Column Name="ExecutionTime" Type="System.String" DbType="VarChar(30)" CanBeNull="true" />
       <Column Name="Priority" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
-      <Column Name="ProjectId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
-      <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" />
       <Column Name="CoresNeeded" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
       <Column Name="MemoryNeeded" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
       <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
+      <Column Name="JobState" Member="State" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState" DbType="VarChar(30)" CanBeNull="false" />
       <Association Name="Job_AssignedResource" Member="AssignedResources" ThisKey="JobId" OtherKey="JobId" Type="AssignedResource" />
       <Association Name="Job_RequiredPlugin" Member="RequiredPlugins" ThisKey="JobId" OtherKey="JobId" Type="RequiredPlugin" />
       <Association Name="Job_Job" Member="ChildJobs" Storage="_Jobs" ThisKey="JobId" OtherKey="ParentJobId" Type="Job" />
       <Association Name="Job_JobData" Member="JobData" ThisKey="JobId" OtherKey="JobId" Type="JobData" Cardinality="One" />
+      <Association Name="Job_StateLog" Member="StateLogs" ThisKey="JobId" OtherKey="JobId" Type="StateLog" />
       <Association Name="Job_Job" Member="ParentJob" Storage="_Job1" ThisKey="ParentJobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />
-      <Association Name="Slave_Job" Member="Slave" ThisKey="SlaveId" OtherKey="ResourceId" Type="Slave" IsForeignKey="true" DeleteRule="SET NULL" />
     </Type>
   </Table>
@@ -100,11 +93,14 @@
       <Column Name="Description" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" />
       <Column Name="ResourceIds" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" />
-      <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" />
+      <Column Name="OwnerUserId" Storage="_UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" />
       <Column Name="RootJobId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" />
       <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime" CanBeNull="false" />
+      <Column Name="LastAccessed" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
+      <Column Name="IsHiveEngine" Type="System.Boolean" DbType="Bit" CanBeNull="false" />
+      <Association Name="HiveExperiment_HiveExperimentPermission" Member="HiveExperimentPermissions" ThisKey="HiveExperimentId" OtherKey="HiveExperimentId" Type="HiveExperimentPermission" />
       <Association Name="Job_HiveExperiment" Member="RootJob" Storage="_Job" ThisKey="RootJobId" OtherKey="JobId" Type="Job" IsForeignKey="true" DeleteRule="CASCADE" />
     </Type>
   </Table>
-  <Table Name="" Member="JobDatas">
+  <Table Name="dbo.JobData" Member="JobDatas">
     <Type Name="JobData">
       <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
@@ -114,5 +110,5 @@
     </Type>
   </Table>
-  <Table Name="" Member="PluginDatas">
+  <Table Name="dbo.PluginData" Member="PluginDatas">
     <Type Name="PluginData">
       <Column Name="PluginDataId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
@@ -123,3 +119,25 @@
     </Type>
   </Table>
+  <Table Name="dbo.StateLog" Member="StateLogs">
+    <Type Name="StateLog">
+      <Column Name="StateLogId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
+      <Column Name="State" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState" DbType="VarChar(30) NOT NULL" CanBeNull="false" />
+      <Column Name="DateTime" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
+      <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
+      <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
+      <Column Name="SlaveId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
+      <Column Name="Exception" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" />
+      <Association Name="Job_StateLog" Member="Job" ThisKey="JobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />
+      <Association Name="Resource_StateLog" Member="Resource" ThisKey="SlaveId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" />
+    </Type>
+  </Table>
+  <Table Name="dbo.HiveExperimentPermission" Member="HiveExperimentPermissions">
+    <Type Name="HiveExperimentPermission">
+      <Column Name="HiveExperimentId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
+      <Column Name="GrantedUserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
+      <Column Name="GrantedByUserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
+      <Column Name="Permission" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.Permission" DbType="VarChar(15) NOT NULL" CanBeNull="false" />
+      <Association Name="HiveExperiment_HiveExperimentPermission" Member="HiveExperiment" ThisKey="HiveExperimentId" OtherKey="HiveExperimentId" Type="HiveExperiment" IsForeignKey="true" />
+    </Type>
+  </Table>
 </Database>
