Store round start date in the database (#21153)
This commit is contained in:
1775
Content.Server.Database/Migrations/Postgres/20231021071411_RoundStartDate.Designer.cs
generated
Normal file
1775
Content.Server.Database/Migrations/Postgres/20231021071411_RoundStartDate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,39 @@
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Content.Server.Database.Migrations.Postgres
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RoundStartDate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "start_date",
|
||||
table: "round",
|
||||
type: "timestamp with time zone",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_round_start_date",
|
||||
table: "round",
|
||||
column: "start_date");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_round_start_date",
|
||||
table: "round");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "start_date",
|
||||
table: "round");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -856,12 +856,20 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("server_id");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValue(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified))
|
||||
.HasColumnName("start_date");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_round");
|
||||
|
||||
b.HasIndex("ServerId")
|
||||
.HasDatabaseName("IX_round_server_id");
|
||||
|
||||
b.HasIndex("StartDate");
|
||||
|
||||
b.ToTable("round", (string)null);
|
||||
});
|
||||
|
||||
|
||||
1705
Content.Server.Database/Migrations/Sqlite/20231021071407_RoundStartDate.Designer.cs
generated
Normal file
1705
Content.Server.Database/Migrations/Sqlite/20231021071407_RoundStartDate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,39 @@
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Content.Server.Database.Migrations.Sqlite
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RoundStartDate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "start_date",
|
||||
table: "round",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_round_start_date",
|
||||
table: "round",
|
||||
column: "start_date");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_round_start_date",
|
||||
table: "round");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "start_date",
|
||||
table: "round");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -806,12 +806,20 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("server_id");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasDefaultValue(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified))
|
||||
.HasColumnName("start_date");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_round");
|
||||
|
||||
b.HasIndex("ServerId")
|
||||
.HasDatabaseName("IX_round_server_id");
|
||||
|
||||
b.HasIndex("StartDate");
|
||||
|
||||
b.ToTable("round", (string)null);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user