2024-08-13 12:29:01 +01:00
|
|
|
|
using System;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
2024-08-15 14:21:17 +01:00
|
|
|
|
namespace AuthorizationService.Migrations
|
2024-08-13 12:29:01 +01:00
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
public partial class ChangedUserWithGuid : Migration
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.AlterColumn<Guid>(
|
|
|
|
|
name: "Id",
|
|
|
|
|
table: "Users",
|
|
|
|
|
type: "TEXT",
|
|
|
|
|
nullable: false,
|
|
|
|
|
oldClrType: typeof(int),
|
|
|
|
|
oldType: "INTEGER")
|
|
|
|
|
.OldAnnotation("Sqlite:Autoincrement", true);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
|
|
|
name: "CreatedAt",
|
|
|
|
|
table: "Users",
|
|
|
|
|
type: "TEXT",
|
|
|
|
|
nullable: false,
|
|
|
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
|
|
|
name: "HashedPassword",
|
|
|
|
|
table: "Users",
|
|
|
|
|
type: "TEXT",
|
|
|
|
|
nullable: false,
|
|
|
|
|
defaultValue: "");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
|
|
|
name: "PasswordBackdoor",
|
|
|
|
|
table: "Users",
|
|
|
|
|
type: "TEXT",
|
|
|
|
|
nullable: false,
|
|
|
|
|
defaultValue: "");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
|
|
|
name: "Salt",
|
|
|
|
|
table: "Users",
|
|
|
|
|
type: "TEXT",
|
|
|
|
|
nullable: false,
|
|
|
|
|
defaultValue: "");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
|
|
|
name: "UpdatedAt",
|
|
|
|
|
table: "Users",
|
|
|
|
|
type: "TEXT",
|
|
|
|
|
nullable: false,
|
|
|
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropColumn(
|
|
|
|
|
name: "CreatedAt",
|
|
|
|
|
table: "Users");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropColumn(
|
|
|
|
|
name: "HashedPassword",
|
|
|
|
|
table: "Users");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropColumn(
|
|
|
|
|
name: "PasswordBackdoor",
|
|
|
|
|
table: "Users");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropColumn(
|
|
|
|
|
name: "Salt",
|
|
|
|
|
table: "Users");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropColumn(
|
|
|
|
|
name: "UpdatedAt",
|
|
|
|
|
table: "Users");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
|
|
|
name: "Id",
|
|
|
|
|
table: "Users",
|
|
|
|
|
type: "INTEGER",
|
|
|
|
|
nullable: false,
|
|
|
|
|
oldClrType: typeof(Guid),
|
|
|
|
|
oldType: "TEXT")
|
|
|
|
|
.Annotation("Sqlite:Autoincrement", true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|