Update password field in db, set null for uninitialized
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
namespace MileageTraker.Web.Migrations
|
||||
{
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class PasswordNullForUninitialized : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
AlterColumn("User", "Password", c => c.String(maxLength: 128));
|
||||
Sql(@"update [User]
|
||||
set Password = null
|
||||
where Password = 'uninitialized_state'");
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
AlterColumn("User", "Password", c => c.String(nullable: false, maxLength: 128));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user