Files
spacerace/Server/Migrations/20230823032740_Beginninging.cs
T
2023-08-24 18:26:40 +10:00

48 lines
1.5 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Server.Migrations
{
/// <inheritdoc />
public partial class Beginninging : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Laps",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
Date = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
UserId = table.Column<Guid>(type: "uuid", nullable: false),
Map = table.Column<string>(type: "text", nullable: false),
Time = table.Column<double>(type: "double precision", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Laps", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_Laps_Map",
table: "Laps",
column: "Map");
migrationBuilder.CreateIndex(
name: "IX_Laps_UserId",
table: "Laps",
column: "UserId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Laps");
}
}
}