Co-authored-by: Veritius <veritiusgaming@gmail.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
41 lines
1.4 KiB
C#
41 lines
1.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Content.Server.Database.Migrations.Sqlite
|
|
{
|
|
public partial class PlayTime : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "play_time",
|
|
columns: table => new
|
|
{
|
|
play_time_id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
player_id = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
tracker = table.Column<string>(type: "TEXT", nullable: false),
|
|
time_spent = table.Column<TimeSpan>(type: "TEXT", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_play_time", x => x.play_time_id);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_play_time_player_id_tracker",
|
|
table: "play_time",
|
|
columns: new[] { "player_id", "tracker" },
|
|
unique: true);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "play_time");
|
|
}
|
|
}
|
|
}
|