using System; using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional namespace Server.Migrations { /// public partial class InitSectors : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Laps", columns: table => new { Id = table.Column(type: "uuid", nullable: false), UserId = table.Column(type: "uuid", nullable: false), Created = table.Column(type: "timestamp with time zone", nullable: false), Time = table.Column(type: "double precision", nullable: false), Sectors = table.Column>(type: "double precision[]", nullable: false), Map = table.Column(type: "text", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Laps", x => x.Id); }); migrationBuilder.InsertData( table: "Laps", columns: new[] { "Id", "Created", "Map", "Sectors", "Time", "UserId" }, values: new object[,] { { new Guid("589bfb11-59c1-4f7e-beef-973c301b8e08"), new DateTimeOffset(new DateTime(2023, 8, 29, 10, 17, 29, 656, DateTimeKind.Unspecified).AddTicks(467), new TimeSpan(0, 0, 0, 0, 0)), "sr_TestTrack", new List { 64.0, 24.0, 24.0 }, 128.0, new Guid("11111111-1111-1111-1111-111111111111") }, { new Guid("678183de-9df4-4d98-9807-f288b54a7f3a"), new DateTimeOffset(new DateTime(2023, 8, 29, 10, 17, 29, 656, DateTimeKind.Unspecified).AddTicks(745), new TimeSpan(0, 0, 0, 0, 0)), "sr_TestTrack", new List { 64.0, 64.0, 24.0 }, 148.0, new Guid("33333333-3333-3333-3333-333333333333") }, { new Guid("67bda0f2-ecf8-4521-ba21-08d252d9ce59"), new DateTimeOffset(new DateTime(2023, 8, 29, 10, 17, 29, 656, DateTimeKind.Unspecified).AddTicks(723), new TimeSpan(0, 0, 0, 0, 0)), "sr_TestTrack", new List { 64.0, 38.0, 24.0 }, 132.0, new Guid("22222222-2222-2222-2222-222222222222") } }); 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); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Laps"); } } }