Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • Fix/xxxx-updateDependencies
  • Hotfix/0071-fixResourceCreate
  • Hotfix/1035-fixResourceApi
  • Hotfix/1360-databaseScaffolding
  • Hotfix/1383-topLevel
  • Hotfix/1383-topLevelAlternative
  • Hotfix/1433-defaultQuota
  • Hotfix/1796-projectDdos
  • Hotfix/2087-efNet6
  • Hotfix/64-releaseUDE
  • Hotfix/73-fixResourceCreateRDS
  • Issue/1321-pidEnquiryOverhaul
  • Issue/1788-extractionCronjob
  • Issue/1866-ExtendResourceTypeConfigurationTUDo
  • Issue/1867-addNewResourceTypes
  • Issue/1877-ExtendResourceTypeConfigurationNRWFHs
  • Issue/1878-addNewResourceTypes
  • Issue/1910-MigrationtoNET6.0
  • Issue/1913-ModificationsResourceMetadata
  • Issue/1951-quotaImplementation
  • Issue/1999-gitlabResourcesLib
  • Issue/2072-wormResourceType
  • Issue/2101-gitLabResTypeUi
  • Issue/2102-gitLabResTypeRCV
  • Issue/2183-kpiGeneratorResource
  • Issue/2221-projectDateCreated
  • Issue/2222-resourceDateCreated
  • Issue/2278-gitlabToS
  • Issue/2287-guestRole
  • Issue/2309-docs
  • Issue/2364-testingKpiParser
  • Issue/2449-GuidPidSlugToProjectSettings
  • Issue/3003-stsInstitute
  • Issues/0028-maxQuotaFix
  • Product/1100-fdsS3
  • Product/1149-dfnaai
  • Product/1154-resourceTypeDefinition
  • Product/1188-LoggingExtended
  • Product/1287-dotnet5Sharepoint
  • Product/1414-fhPrivileges
  • Product/1470-migrationForArchiving
  • Product/1573-ReadOnlyResources
  • Product/1629-onboardingOtherUniversities
  • Product/202-userInvitation
  • Product/407-net5migration
  • Product/704-basicReporting
  • Product/789-userContactEmail
  • Product/903-ApiTokens
  • Sprint/2020-20
  • Sprint/2020-22
  • Sprint/2021-01
  • Sprint/2021-03
  • Sprint/2021-04
  • Sprint/2021-05
  • Sprint/2021-08
  • Sprint/2021-10
  • Sprint/2021-11
  • Sprint/2021-15
  • Sprint/2021-19
  • Sprint/2022-01
  • Test/xxxx-pipelineTriggers
  • Topic/1051-basicReporting
  • Topic/1125-apiTokens
  • Topic/1159-rtdApi
  • Topic/1221-LogginExtendedNew
  • Topic/1221-LoggingExtended
  • Topic/1226-databaseLibraryMigration
  • Topic/1278-dfnAAI
  • Topic/1286-dotnet5Database
  • Topic/1292-FdsS3
  • Topic/1294-contactChangeFunctionality
  • Topic/1425-fhPrivileges
  • Topic/1453-userInvitation
  • Topic/1556-migrationForArchiving
  • Topic/1597-AddArchiveFlagInResourceObject
  • Topic/1711-extendResourceTypeConfiguration
  • Topic/1714-newResourceTypesUDE
  • dev
  • gitkeep
  • master
  • v1.0.0
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.12.0
  • v1.12.1
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.15.1
  • v1.16.0
  • v1.17.0
  • v1.18.0
  • v1.19.0
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.20.0
  • v1.21.0
  • v1.22.0
  • v1.22.1
  • v1.22.2
  • v1.23.0
  • v1.24.0
  • v1.25.0
  • v1.25.1
  • v1.26.0
  • v1.27.0
  • v1.27.1
  • v1.28.0
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.7.0
  • v1.8.0
  • v1.9.0
  • v2.0.0
  • v2.0.1
  • v2.1.0
  • v2.1.1
  • v2.10.0
  • v2.10.1
  • v2.11.0
  • v2.11.1
  • v2.12.0
  • v2.12.1
  • v2.13.0
  • v2.14.0
  • v2.15.0
  • v2.16.0
  • v2.16.1
  • v2.16.2
  • v2.17.0
  • v2.18.0
  • v2.19.0
  • v2.19.1
  • v2.2.0
  • v2.2.1
  • v2.20.0
  • v2.22.0
  • v2.3.0
  • v2.4.0
  • v2.4.1
  • v2.5.0
  • v2.6.0
  • v2.7.0
  • v2.7.1
  • v2.7.2
  • v2.7.3
  • v2.8.0
  • v2.9.0
  • v2.9.1
154 results

Target

Select target project
  • coscine/backend/libraries/database
1 result
Select Git revision
  • Fix/xxxx-updateDependencies
  • Hotfix/0071-fixResourceCreate
  • Hotfix/1035-fixResourceApi
  • Hotfix/1360-databaseScaffolding
  • Hotfix/1383-topLevel
  • Hotfix/1383-topLevelAlternative
  • Hotfix/1433-defaultQuota
  • Hotfix/1796-projectDdos
  • Hotfix/2087-efNet6
  • Hotfix/64-releaseUDE
  • Hotfix/73-fixResourceCreateRDS
  • Issue/1321-pidEnquiryOverhaul
  • Issue/1788-extractionCronjob
  • Issue/1866-ExtendResourceTypeConfigurationTUDo
  • Issue/1867-addNewResourceTypes
  • Issue/1877-ExtendResourceTypeConfigurationNRWFHs
  • Issue/1878-addNewResourceTypes
  • Issue/1910-MigrationtoNET6.0
  • Issue/1913-ModificationsResourceMetadata
  • Issue/1951-quotaImplementation
  • Issue/1999-gitlabResourcesLib
  • Issue/2072-wormResourceType
  • Issue/2101-gitLabResTypeUi
  • Issue/2102-gitLabResTypeRCV
  • Issue/2183-kpiGeneratorResource
  • Issue/2221-projectDateCreated
  • Issue/2222-resourceDateCreated
  • Issue/2278-gitlabToS
  • Issue/2287-guestRole
  • Issue/2309-docs
  • Issue/2364-testingKpiParser
  • Issue/2449-GuidPidSlugToProjectSettings
  • Issue/3003-stsInstitute
  • Issues/0028-maxQuotaFix
  • Product/1100-fdsS3
  • Product/1149-dfnaai
  • Product/1154-resourceTypeDefinition
  • Product/1188-LoggingExtended
  • Product/1287-dotnet5Sharepoint
  • Product/1414-fhPrivileges
  • Product/1470-migrationForArchiving
  • Product/1573-ReadOnlyResources
  • Product/1629-onboardingOtherUniversities
  • Product/202-userInvitation
  • Product/407-net5migration
  • Product/704-basicReporting
  • Product/789-userContactEmail
  • Product/903-ApiTokens
  • Sprint/2020-20
  • Sprint/2020-22
  • Sprint/2021-01
  • Sprint/2021-03
  • Sprint/2021-04
  • Sprint/2021-05
  • Sprint/2021-08
  • Sprint/2021-10
  • Sprint/2021-11
  • Sprint/2021-15
  • Sprint/2021-19
  • Sprint/2022-01
  • Test/xxxx-pipelineTriggers
  • Topic/1051-basicReporting
  • Topic/1125-apiTokens
  • Topic/1159-rtdApi
  • Topic/1221-LogginExtendedNew
  • Topic/1221-LoggingExtended
  • Topic/1226-databaseLibraryMigration
  • Topic/1278-dfnAAI
  • Topic/1286-dotnet5Database
  • Topic/1292-FdsS3
  • Topic/1294-contactChangeFunctionality
  • Topic/1425-fhPrivileges
  • Topic/1453-userInvitation
  • Topic/1556-migrationForArchiving
  • Topic/1597-AddArchiveFlagInResourceObject
  • Topic/1711-extendResourceTypeConfiguration
  • Topic/1714-newResourceTypesUDE
  • dev
  • gitkeep
  • master
  • v1.0.0
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.12.0
  • v1.12.1
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.15.1
  • v1.16.0
  • v1.17.0
  • v1.18.0
  • v1.19.0
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.20.0
  • v1.21.0
  • v1.22.0
  • v1.22.1
  • v1.22.2
  • v1.23.0
  • v1.24.0
  • v1.25.0
  • v1.25.1
  • v1.26.0
  • v1.27.0
  • v1.27.1
  • v1.28.0
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.7.0
  • v1.8.0
  • v1.9.0
  • v2.0.0
  • v2.0.1
  • v2.1.0
  • v2.1.1
  • v2.10.0
  • v2.10.1
  • v2.11.0
  • v2.11.1
  • v2.12.0
  • v2.12.1
  • v2.13.0
  • v2.14.0
  • v2.15.0
  • v2.16.0
  • v2.16.1
  • v2.16.2
  • v2.17.0
  • v2.18.0
  • v2.19.0
  • v2.19.1
  • v2.2.0
  • v2.2.1
  • v2.20.0
  • v2.22.0
  • v2.3.0
  • v2.4.0
  • v2.4.1
  • v2.5.0
  • v2.6.0
  • v2.7.0
  • v2.7.1
  • v2.7.2
  • v2.7.3
  • v2.8.0
  • v2.9.0
  • v2.9.1
154 results
Show changes
Commits on Source (7)
Showing
with 232 additions and 39 deletions
......@@ -21,8 +21,11 @@ migrate:
script:
- dotnet tool install dotnet-ef; echo "1"
- dotnet tool update dotnet-ef
# List dependencies that will be used during build
- dotnet restore src --no-cache
- dotnet list src package
# Create new database and migrate to latest state
- dotnet run -p .\src\Database.Actions -- --action-create --name $DB_NAME --source $DB_DATA_SOURCE --user $DB_USER_ID --pw $DB_PASSWORD
- dotnet run --project .\src\Database.Actions -- --action-create --name $DB_NAME --source $DB_DATA_SOURCE --user $DB_USER_ID --pw $DB_PASSWORD
# Scaffold created database
- dotnet ef dbcontext scaffold "Data Source=$DB_DATA_SOURCE;Integrated Security=False;User ID=$DB_USER_ID;Password=$DB_PASSWORD;Database=$DB_NAME" Microsoft.EntityFrameworkCore.SqlServer -o DataModel -c "Model" -f --no-onconfiguring --project "src\Scaffolding"
# Remove the hardcoded Connection String inside \DataModel\Model.cs
......
......@@ -5,7 +5,7 @@
<RootNamespace>Coscine.Database.Actions</RootNamespace>
<AssemblyName>Coscine.Database.Actions</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<Version>2.11.1</Version>
<Version>2.12.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Coscine.Database.Helpers" Version="2.*-*" />
......
......@@ -5,7 +5,7 @@
<AssemblyName>Coscine.Database.Tests</AssemblyName>
<TargetFrameworks>net6.0;net461</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Version>2.11.1</Version>
<Version>2.12.0</Version>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Database\Database.csproj" />
......
......@@ -4,7 +4,7 @@
<RootNamespace>Coscine.Database</RootNamespace>
<AssemblyName>Coscine.Database</AssemblyName>
<TargetFrameworks>net6.0;net461</TargetFrameworks>
<Version>2.11.1</Version>
<Version>2.12.0</Version>
</PropertyGroup>
<PropertyGroup>
<Authors>RWTH Aachen University</Authors>
......
......@@ -25,11 +25,14 @@ namespace Coscine.Database.Models
public Dictionary<string, string> GetResourceTypeOptions(Guid id)
{
var dictionary = new Dictionary<string, string>();
var resourceType = GetById(id);
dictionary.Add("token", resourceType.Token);
dictionary.Add("repositoryUrl", resourceType.RepositoryUrl);
dictionary.Add("repositoryNumber", resourceType.RepositoryNumber.ToString());
var dictionary = new Dictionary<string, string>
{
{ "branchName", resourceType.Branch },
{ "projectId", resourceType.GitlabProjectId.ToString() },
{ "repositoryUrl", resourceType.RepoUrl },
{ "accessToken", resourceType.ProjectAccessToken }
};
return dictionary;
}
}
......
......@@ -31,8 +31,7 @@ namespace Coscine.Database.Models
{ "accessKey", resourceType.AccessKey },
{ "secretKey", resourceType.SecretKey },
{ "bucketname", resourceType.BucketName },
{ "endpoint", resourceType.Endpoint },
{ "size", $"{resourceType.Size}" }
{ "endpoint", resourceType.Endpoint }
};
return dictionary;
}
......
......@@ -34,8 +34,7 @@ namespace Coscine.Database.Models
{ "accessKeyWrite", resourceType.AccessKeyWrite },
{ "secretKeyWrite", resourceType.SecretKeyWrite },
{ "bucketname", resourceType.BucketName },
{ "endpoint", resourceType.Endpoint },
{ "size", $"{resourceType.Size}" }
{ "endpoint", resourceType.Endpoint }
};
return dictionary;
}
......
......@@ -34,8 +34,7 @@ namespace Coscine.Database.Models
{ "accessKeyWrite", resourceType.AccessKeyWrite },
{ "secretKeyWrite", resourceType.SecretKeyWrite },
{ "bucketname", resourceType.BucketName },
{ "endpoint", resourceType.Endpoint },
{ "size", $"{resourceType.Size}" }
{ "endpoint", resourceType.Endpoint }
};
return dictionary;
}
......
......@@ -283,7 +283,7 @@ namespace Coscine.Database.Models
{
RDSResourceTypeModel rdsResourceTypeModel = new RDSResourceTypeModel();
var rdsResourceType = rdsResourceTypeModel.GetById(resource.ResourceTypeOptionId.Value);
resourceTypeOptionObject = new RDSResourceTypeObject(rdsResourceType.Id, rdsResourceType.BucketName, (int)rdsResourceType.Size);
resourceTypeOptionObject = new RDSResourceTypeObject(rdsResourceType.Id, rdsResourceType.BucketName, null);
}
else if (resource.Type.Type == "s3" && resource.ResourceTypeOptionId != null)
{
......@@ -295,7 +295,7 @@ namespace Coscine.Database.Models
{
GitlabResourceTypeModel gitlabResourceTypeModel = new GitlabResourceTypeModel();
var gitlabResourceType = gitlabResourceTypeModel.GetById(resource.ResourceTypeOptionId.Value);
resourceTypeOptionObject = new GitlabResourceTypeObject(gitlabResourceType.Id, gitlabResourceType.RepositoryNumber, gitlabResourceType.RepositoryUrl, null);
resourceTypeOptionObject = new GitlabResourceTypeObject(gitlabResourceType.Id, gitlabResourceType.Branch, gitlabResourceType.GitlabProjectId, gitlabResourceType.RepoUrl, gitlabResourceType.ProjectAccessToken);
}
else if (resource.Type.Type == "linked" && resource.ResourceTypeOptionId != null)
{
......@@ -314,9 +314,9 @@ namespace Coscine.Database.Models
Endpoint = rdsS3ResourceType.Endpoint,
ReadAccessKey = rdsS3ResourceType.AccessKeyRead,
ReadSecretKey = rdsS3ResourceType.SecretKeyRead,
Size = rdsS3ResourceType.Size,
WriteAccessKey = rdsS3ResourceType.AccessKeyWrite,
WriteSecretKey = rdsS3ResourceType.SecretKeyWrite,
Size = null
};
}
else if (resource.Type.Type == "rdss3worm" && resource.ResourceTypeOptionId != null)
......@@ -330,9 +330,9 @@ namespace Coscine.Database.Models
Endpoint = rdsS3WormResourceType.Endpoint,
ReadAccessKey = rdsS3WormResourceType.AccessKeyRead,
ReadSecretKey = rdsS3WormResourceType.SecretKeyRead,
Size = rdsS3WormResourceType.Size,
WriteAccessKey = rdsS3WormResourceType.AccessKeyWrite,
WriteSecretKey = rdsS3WormResourceType.SecretKeyWrite,
Size = null
};
}
......
......@@ -6,17 +6,18 @@ namespace Coscine.Database.ReturnObjects
public class GitlabResourceTypeObject : ResourceTypeOptionObject
{
public Guid Id { get; set; }
public string BranchName { get; set; }
public int ProjectId { get; set; }
public Uri RepositoryUrl { get; set; }
public string AccessToken { get; set; }
public int RepositoryNumber { get; set; }
public string RepositoryUrl { get; set; }
public string Token { get; set; }
public GitlabResourceTypeObject(Guid id, int repositoryNumber, string repositoryUrl, string token)
public GitlabResourceTypeObject(Guid id, string branchName, int projectId, string repoUrl, string accessToken)
{
Id = id;
RepositoryNumber = repositoryNumber;
RepositoryUrl = repositoryUrl;
Token = token;
BranchName = branchName;
ProjectId = projectId;
RepositoryUrl = new Uri(repoUrl);
AccessToken = accessToken;
}
}
}
using System;
namespace Coscine.Database.ReturnObjects;
/// <summary>
/// Return object for a project invitation.
/// </summary>
public class InvitationReturnObject
{
/// <summary>
/// The invitation id.
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// When the invite will expire.
/// </summary>
public DateTime Expiration { get; set; }
/// <summary>
/// Email of the invitee.
/// </summary>
public string UserMail { get; set; }
/// <summary>
/// Id of the issuer.
/// </summary>
public Guid Issuer { get; set; }
/// <summary>
/// Id of the project.
/// </summary>
public Guid ProjectId { get; set; }
/// <summary>
/// Id of the target Role.
/// </summary>
public Guid RoleId { get; set; }
}
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace Coscine.Database.ReturnObjects;
/// <summary>
/// Contains information about the quota of a project by resource type.
/// </summary>
public class ProjectQuotaExtendedReturnObject
{
/// <summary>
/// Id of the resoure type.
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// Display name of the resource type.
/// </summary>
public string Name { get; set; }
/// <summary>
/// How much space is reserved by resources in total [GiB]. Is equal to the sum of all resource quota reserved values.
/// </summary>
public QuotaDimObject TotalReserved { get; set; }
/// <summary>
/// How much space is currently allocated and is available to be taken by resources [GiB] (See Database, Table 'ProjectQuotas', Column 'Quota').
/// </summary>
public QuotaDimObject Allocated { get; set; }
/// <summary>
/// How much maximum space is possible to be taken by resources [GiB] (See Database, Table 'ProjectQuotas', Column 'MaxQuota').
/// </summary>
public QuotaDimObject Maximum { get; set; }
/// <summary>
/// Resources quota for all individual resources of a resource type in a selected project.
/// </summary>
public IEnumerable<ResourceQuotaReturnObject> ResourcesQuota { get; set; }
}
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace Coscine.Database.ReturnObjects;
/// <summary>
/// Contains information about the quota of a project by resource type.
/// </summary>
public class ProjectQuotaReturnObject
{
/// <summary>
/// Id of the resoure type.
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// Display name of the resource type.
/// </summary>
public string Name { get; set; }
/// <summary>
/// How much space is reserved by resources in total [GiB]. Is equal to the sum of all resource quota reserved values.
/// </summary>
public QuotaDimObject TotalReserved { get; set; }
/// <summary>
/// How much space is currently allocated and is available to be taken by resources [GiB] (See Database, Table 'ProjectQuotas', Column 'Quota').
/// </summary>
public QuotaDimObject Allocated { get; set; }
/// <summary>
/// How much maximum space is possible to be taken by resources [GiB] (See Database, Table 'ProjectQuotas', Column 'MaxQuota').
/// </summary>
public QuotaDimObject Maximum { get; set; }
}
\ No newline at end of file
namespace Coscine.Database.ReturnObjects;
public class QuotaDimObject
{
public float Value { get; set; }
public QuotaUnit Unit { get; set; }
}
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel;
using System.Runtime.Serialization;
namespace Coscine.Database.ReturnObjects;
[JsonConverter(typeof(StringEnumConverter))]
public enum QuotaUnit
{
[Description("The byte is a unit of digital information in computing and telecommunications that most commonly consists of eight bits.")]
[EnumMember(Value = "https://qudt.org/vocab/unit/BYTE")]
BYTE,
[Description("The kibibyte is a multiple of the unit byte for digital information equivalent to 1024 bytes.")]
[EnumMember(Value = "https://qudt.org/vocab/unit/KibiBYTE")]
KibiBYTE,
[Description("The mebibyte is a multiple of the unit byte for digital information equivalent to 1024^2 or 2^20 bytes.")]
[EnumMember(Value = "https://qudt.org/vocab/unit/MebiBYTE")]
MebiBYTE,
[Description("The gibibyte is a multiple of the unit byte for digital information storage. The prefix gibi means 1024^3.")]
[EnumMember(Value = "https://qudt.org/vocab/unit/GibiBYTE")]
GibiBYTE,
[Description("The tebibyte is a multiple of the unit byte for digital information. The prefix tebi means 1024^4.")]
[EnumMember(Value = "https://qudt.org/vocab/unit/TebiBYTE")]
TebiBYTE,
[Description("The tebibyte is a multiple of the unit byte for digital information. The prefix tebi means 1024^5.")]
[EnumMember(Value = "https://qudt.org/vocab/unit/PebiBYTE")]
PebiBYTE,
}
\ No newline at end of file
......@@ -7,9 +7,9 @@ namespace Coscine.Database.ReturnObjects
{
public Guid Id { get; set; }
public string BucketName { get; set; }
public int Size { get; set; }
public int? Size { get; set; }
public RDSResourceTypeObject(Guid id, string bucketName, int size)
public RDSResourceTypeObject(Guid id, string bucketName, int? size)
{
Id = id;
BucketName = bucketName;
......
......@@ -12,6 +12,6 @@ namespace Coscine.Database.ReturnObjects
public string WriteAccessKey { get; set; }
public string WriteSecretKey { get; set; }
public string Endpoint { get; set; }
public int Size { get; set; }
public int? Size { get; set; }
}
}
\ No newline at end of file
using System;
namespace Coscine.Database.ReturnObjects;
/// <summary>
/// Contains information about the quota of a resource.
/// </summary>
public class ResourceQuotaReturnObject
{
/// <summary>
/// Id of the resoure.
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// Display name of the resource.
/// </summary>
public string Name { get; set; }
/// <summary>
/// How much space is used by all files in a resource [Bytes].
/// </summary>
public QuotaDimObject Used { get; set; }
/// <summary>
/// How much space is used by all files in a resource [%].
/// </summary>
public float UsedPercentage { get; set; }
/// <summary>
/// How much space is reserved and is available to be taken by the resource [GiB]. This number represents its capacity.
/// </summary>
public QuotaDimObject Reserved { get; set; }
}
......@@ -10,8 +10,9 @@ namespace Coscine.Database.DataModel
public partial class GitlabResourceType
{
public Guid Id { get; set; }
public int RepositoryNumber { get; set; }
public string RepositoryUrl { get; set; }
public string Token { get; set; }
public string Branch { get; set; }
public int GitlabProjectId { get; set; }
public string RepoUrl { get; set; }
public string ProjectAccessToken { get; set; }
}
}
......@@ -196,13 +196,17 @@ namespace Coscine.Database.DataModel
entity.Property(e => e.Id).HasDefaultValueSql("(newid())");
entity.Property(e => e.RepositoryUrl)
entity.Property(e => e.Branch)
.IsRequired()
.HasMaxLength(500);
.HasMaxLength(200);
entity.Property(e => e.ProjectAccessToken)
.IsRequired()
.HasMaxLength(200);
entity.Property(e => e.Token)
entity.Property(e => e.RepoUrl)
.IsRequired()
.HasMaxLength(100);
.HasMaxLength(200);
});
modelBuilder.Entity<Group>(entity =>
......@@ -476,7 +480,6 @@ namespace Coscine.Database.DataModel
entity.HasOne(d => d.Resource)
.WithMany(p => p.ProjectResources)
.HasForeignKey(d => d.ResourceId)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_ProjectResource_ResourceId_Resources_Id");
});
......@@ -659,7 +662,6 @@ namespace Coscine.Database.DataModel
entity.HasOne(d => d.Resource)
.WithMany(p => p.ResourceDisciplines)
.HasForeignKey(d => d.ResourceId)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_ResourceDiscipline_ResourceId_Resources_Id");
});
......