API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20200909084924_TimeshareAmmendment.cs 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace UnivateProperties_API.Migrations
  4. {
  5. //run before update: UPDATE weeks SET Mandate = 0
  6. public partial class TimeshareAmmendment : Migration
  7. {
  8. protected override void Up(MigrationBuilder migrationBuilder)
  9. {
  10. migrationBuilder.AlterColumn<bool>(
  11. name: "Mandate",
  12. table: "Weeks",
  13. nullable: false,
  14. oldClrType: typeof(string),
  15. oldNullable: true);
  16. migrationBuilder.AddColumn<DateTime>(
  17. name: "DateMandated",
  18. table: "Weeks",
  19. nullable: false,
  20. defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
  21. }
  22. protected override void Down(MigrationBuilder migrationBuilder)
  23. {
  24. migrationBuilder.DropColumn(
  25. name: "DateMandated",
  26. table: "Weeks");
  27. migrationBuilder.AlterColumn<string>(
  28. name: "Mandate",
  29. table: "Weeks",
  30. nullable: true,
  31. oldClrType: typeof(bool));
  32. }
  33. }
  34. }