20231021071411_RoundStartDate.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #nullable disable
  2. using System;
  3. using Microsoft.EntityFrameworkCore.Migrations;
  4. namespace Content.Server.Database.Migrations.Postgres
  5. {
  6. /// <inheritdoc />
  7. public partial class RoundStartDate : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.AddColumn<DateTime>(
  13. name: "start_date",
  14. table: "round",
  15. type: "timestamp with time zone",
  16. nullable: false,
  17. defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
  18. migrationBuilder.CreateIndex(
  19. name: "IX_round_start_date",
  20. table: "round",
  21. column: "start_date");
  22. }
  23. /// <inheritdoc />
  24. protected override void Down(MigrationBuilder migrationBuilder)
  25. {
  26. migrationBuilder.DropIndex(
  27. name: "IX_round_start_date",
  28. table: "round");
  29. migrationBuilder.DropColumn(
  30. name: "start_date",
  31. table: "round");
  32. }
  33. }
  34. }