Commit e5f0f037 authored by L. Ellenbeck's avatar L. Ellenbeck
Browse files

Merge branch 'Topic/798-tosMiddleware' into 'Product/708-tosProcess'

New: TOS DB Model

See merge request coscine/cs/migrations!16
parents d173cedf 1046ca32
using FluentMigrator;
using System;
namespace Coscine.Database.Migration.Migrations
{
//yyyymmddhhmm
[Migration(202005251520)]
public class Migration202005251520TOS : FluentMigrator.Migration
{
public override void Down()
{
Delete.Table("TOSAccepted");
}
public override void Up()
{
Create.Table("TOSAccepted")
.WithColumn("RelationId").AsGuid().PrimaryKey().WithDefault(SystemMethods.NewGuid)
.WithColumn("UserId").AsGuid().NotNullable()
.WithColumn("Version").AsString(10).NotNullable();
Create.ForeignKey()
.FromTable("TOSAccepted").ForeignColumn("UserId")
.ToTable("Users").PrimaryColumn("Id");
}
}
}
...@@ -170,6 +170,7 @@ ...@@ -170,6 +170,7 @@
<Compile Include="Migrations\Migration202003121255ActivatedFeatures.cs" /> <Compile Include="Migrations\Migration202003121255ActivatedFeatures.cs" />
<Compile Include="Migrations\Migration202004151354S3ResourceUrl.cs" /> <Compile Include="Migrations\Migration202004151354S3ResourceUrl.cs" />
<Compile Include="Migrations\Migration202003192117ORCiDEmailAddress.cs" /> <Compile Include="Migrations\Migration202003192117ORCiDEmailAddress.cs" />
<Compile Include="Migrations\Migration202005251520TOS.cs" />
<Compile Include="Migrator.cs" /> <Compile Include="Migrator.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
......
...@@ -55,7 +55,6 @@ namespace Coscine.Database.Migration ...@@ -55,7 +55,6 @@ namespace Coscine.Database.Migration
} }
else else
{ {
Console.WriteLine("Argument missing or invalid. Please enter the number of steps to roll back!"); Console.WriteLine("Argument missing or invalid. Please enter the number of steps to roll back!");
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment