migrating session/map it to guid.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michele Scandura 2021-09-16 16:51:07 +01:00
parent 155cb4ea9a
commit 195533bce0
17 changed files with 672 additions and 82 deletions

View file

@ -0,0 +1,80 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Sledgemapper.Api.Migrations
{
public partial class SessionIdToGuid : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<Guid>(
name: "SessionId",
table: "Snapshots",
type: "TEXT",
nullable: false,
oldClrType: typeof(int),
oldType: "INTEGER");
migrationBuilder.AlterColumn<Guid>(
name: "SessionId",
table: "SessionUsers",
type: "TEXT",
nullable: false,
oldClrType: typeof(int),
oldType: "INTEGER");
migrationBuilder.AlterColumn<Guid>(
name: "SessionId",
table: "Sessions",
type: "TEXT",
nullable: false,
oldClrType: typeof(int),
oldType: "INTEGER")
.OldAnnotation("Sqlite:Autoincrement", true);
migrationBuilder.AlterColumn<Guid>(
name: "SessionId",
table: "MapLogs",
type: "TEXT",
nullable: false,
oldClrType: typeof(int),
oldType: "INTEGER");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "SessionId",
table: "Snapshots",
type: "INTEGER",
nullable: false,
oldClrType: typeof(Guid),
oldType: "TEXT");
migrationBuilder.AlterColumn<int>(
name: "SessionId",
table: "SessionUsers",
type: "INTEGER",
nullable: false,
oldClrType: typeof(Guid),
oldType: "TEXT");
migrationBuilder.AlterColumn<int>(
name: "SessionId",
table: "Sessions",
type: "INTEGER",
nullable: false,
oldClrType: typeof(Guid),
oldType: "TEXT")
.Annotation("Sqlite:Autoincrement", true);
migrationBuilder.AlterColumn<int>(
name: "SessionId",
table: "MapLogs",
type: "INTEGER",
nullable: false,
oldClrType: typeof(Guid),
oldType: "TEXT");
}
}
}