20240409013832_FixRoundStartDateNullability.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace Content.Server.Database.Migrations.Sqlite
  5. {
  6. /// <inheritdoc />
  7. public partial class FixRoundStartDateNullability : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.AlterColumn<DateTime>(
  13. name: "start_date",
  14. table: "round",
  15. type: "TEXT",
  16. nullable: true,
  17. oldClrType: typeof(DateTime),
  18. oldType: "TEXT",
  19. oldDefaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
  20. }
  21. /// <inheritdoc />
  22. protected override void Down(MigrationBuilder migrationBuilder)
  23. {
  24. migrationBuilder.AlterColumn<DateTime>(
  25. name: "start_date",
  26. table: "round",
  27. type: "TEXT",
  28. nullable: false,
  29. defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  30. oldClrType: typeof(DateTime),
  31. oldType: "TEXT",
  32. oldNullable: true);
  33. }
  34. }
  35. }