Skip to content
Snippets Groups Projects
Commit f1095746 authored by Marcel Nellesen's avatar Marcel Nellesen
Browse files

Merge branch 'Product/708-tosProcess' into 'Sprint/2020-10'

Product/708-tosProcess

See merge request coscine/cs/migrations!20
parents 37db34e2 e5f0f037
No related branches found
No related tags found
2 merge requests!20Product/708-tosProcess,!17Sprint/2020-10
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");
}
}
}
......@@ -172,6 +172,7 @@
<Compile Include="Migrations\Migration202005151300ExtendUser.cs" />
<Compile Include="Migrations\Migration202004151354S3ResourceUrl.cs" />
<Compile Include="Migrations\Migration202003192117ORCiDEmailAddress.cs" />
<Compile Include="Migrations\Migration202005251520TOS.cs" />
<Compile Include="Migrator.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
......
......@@ -55,7 +55,6 @@ namespace Coscine.Database.Migration
}
else
{
Console.WriteLine("Argument missing or invalid. Please enter the number of steps to roll back!");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment