Files
spacerace/Server/Migrations/20230829014321_Beginninging.cs
T
2023-08-29 11:45:08 +10:00

61 lines
2.7 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
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),
Created = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
UserId = table.Column<Guid>(type: "uuid", nullable: false),
Time = table.Column<double>(type: "double precision", nullable: false),
Map = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Laps", x => x.Id);
});
migrationBuilder.InsertData(
table: "Laps",
columns: new[] { "Id", "Created", "Map", "Time", "UserId" },
values: new object[,]
{
{ new Guid("2b649610-1da8-450a-ad24-021626d80c60"), new DateTimeOffset(new DateTime(2023, 8, 29, 1, 43, 21, 914, DateTimeKind.Unspecified).AddTicks(5750), new TimeSpan(0, 0, 0, 0, 0)), "sr_TestTrack", 148.0, new Guid("7ca95bb5-0145-4c59-86cc-a499b01ba036") },
{ new Guid("6cb7876e-3059-44ea-af56-1968d653f001"), new DateTimeOffset(new DateTime(2023, 8, 29, 1, 43, 21, 914, DateTimeKind.Unspecified).AddTicks(5742), new TimeSpan(0, 0, 0, 0, 0)), "sr_TestTrack", 132.0, new Guid("157a119a-e3e2-4623-ac6c-2dda797dd301") },
{ new Guid("c3a3f8d9-01a7-4420-bb57-a8f26baabc4d"), new DateTimeOffset(new DateTime(2023, 8, 29, 1, 43, 21, 914, DateTimeKind.Unspecified).AddTicks(5704), new TimeSpan(0, 0, 0, 0, 0)), "sr_TestTrack", 128.0, new Guid("9d2c95b9-5ba6-4ff5-afc5-f20f34620d82") }
});
migrationBuilder.CreateIndex(
name: "IX_Laps_Map",
table: "Laps",
column: "Map");
migrationBuilder.CreateIndex(
name: "IX_Laps_UserId_Map",
table: "Laps",
columns: new[] { "UserId", "Map" },
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Laps");
}
}
}