forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store round start date in the database (space-wizards#21153)
- Loading branch information
1 parent
190b1f6
commit 43d5c00
Showing
8 changed files
with
3,584 additions
and
0 deletions.
There are no files selected for viewing
1,775 changes: 1,775 additions & 0 deletions
1,775
Content.Server.Database/Migrations/Postgres/20231021071411_RoundStartDate.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
Content.Server.Database/Migrations/Postgres/20231021071411_RoundStartDate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.