sledgemapper/Sledgemapper.Api/Migrations/20210916154553_SessionIdToGuid.cs
Michele Scandura 195533bce0
All checks were successful
continuous-integration/drone/push Build is passing
migrating session/map it to guid.
2021-09-16 16:51:07 +01:00

80 lines
2.5 KiB
C#

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");
}
}
}