20210706014915_set MembershipSubAccountIdentity.Identity to required.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. namespace Gateway.POS.Migrations
  3. {
  4. public partial class setMembershipSubAccountIdentityIdentitytorequired : Migration
  5. {
  6. protected override void Up(MigrationBuilder migrationBuilder)
  7. {
  8. migrationBuilder.Sql("DELETE from MembershipSubAccountIdentities where Identity is Null");
  9. migrationBuilder.AlterColumn<string>(
  10. name: "Identity",
  11. table: "MembershipSubAccountIdentities",
  12. type: "TEXT",
  13. nullable: false,
  14. defaultValue: "",
  15. oldClrType: typeof(string),
  16. oldType: "TEXT",
  17. oldNullable: true);
  18. }
  19. protected override void Down(MigrationBuilder migrationBuilder)
  20. {
  21. migrationBuilder.AlterColumn<string>(
  22. name: "Identity",
  23. table: "MembershipSubAccountIdentities",
  24. type: "TEXT",
  25. nullable: true,
  26. oldClrType: typeof(string),
  27. oldType: "TEXT");
  28. }
  29. }
  30. }