using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace AuthorizationService.Migrations { /// public partial class ChangedUserWithGuid : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "Id", table: "Users", type: "TEXT", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AddColumn( name: "CreatedAt", table: "Users", type: "TEXT", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); migrationBuilder.AddColumn( name: "HashedPassword", table: "Users", type: "TEXT", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "PasswordBackdoor", table: "Users", type: "TEXT", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "Salt", table: "Users", type: "TEXT", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "UpdatedAt", table: "Users", type: "TEXT", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); } /// 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( name: "Id", table: "Users", type: "INTEGER", nullable: false, oldClrType: typeof(Guid), oldType: "TEXT") .Annotation("Sqlite:Autoincrement", true); } } }