Commit a803adce authored by Petar Hristov's avatar Petar Hristov 💬 Committed by Benedikt Heinrichs
Browse files

New: Add the Contact Changing functionality to the database and backend

parent 7ee3c481
using FluentMigrator;
namespace Coscine.Migrations.Migrations
{
//yyyymmddhhmm
[Migration(202102021140)]
public class Migration202102021140ContactChange : FluentMigrator.Migration
{
public override void Down()
{
Delete.Table("ContactChange");
}
public override void Up()
{
Create.Table("ContactChange")
.WithColumn("RelationId").AsGuid().PrimaryKey().WithDefault(SystemMethods.NewGuid)
.WithColumn("UserId").AsGuid()
.WithColumn("NewEmail").AsString(200).NotNullable()
.WithColumn("EditDate").AsDateTime().Nullable()
.WithColumn("ConfirmationToken").AsGuid().NotNullable().WithDefault(SystemMethods.NewGuid);
Create.ForeignKey()
.FromTable("ContactChange").ForeignColumn("UserId")
.ToTable("Users").PrimaryColumn("Id");
}
}
}
......@@ -76,7 +76,7 @@ namespace Coscine.Migrator
break;
default:
Console.WriteLine("A invalid input was provided.");
Console.WriteLine("An invalid input was provided.");
PrintHelp();
break;
}
......
Markdown is supported
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