20200622114406_User_Mail.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. namespace GreenTree.Strohrmann.ERP.Domain.Migrations
  3. {
  4. public partial class User_Mail : Migration
  5. {
  6. protected override void Up(MigrationBuilder migrationBuilder)
  7. {
  8. migrationBuilder.AddColumn<string>(
  9. name: "MailAddress",
  10. table: "Users",
  11. nullable: false);
  12. migrationBuilder.AddColumn<string>(
  13. name: "Password",
  14. table: "Users",
  15. nullable: false);
  16. // Set default password value for initialization
  17. migrationBuilder.Sql(
  18. "UPDATE Users " +
  19. "SET Password = 'a3b9c163f6c520407ff34cfdb83ca5c6' " +
  20. "WHERE Password IS NULL");
  21. }
  22. protected override void Down(MigrationBuilder migrationBuilder)
  23. {
  24. migrationBuilder.DropColumn(
  25. name: "MailAddress",
  26. table: "Users");
  27. migrationBuilder.DropColumn(
  28. name: "Password",
  29. table: "Users");
  30. }
  31. }
  32. }