using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DatabaseTest.Migrations { /// public partial class Security : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropPrimaryKey( name: "PK_Tokens", table: "Tokens"); migrationBuilder.DropColumn( name: "Id", table: "Tokens"); migrationBuilder.DropColumn( name: "OwnerId", table: "Permissions"); migrationBuilder.AlterColumn( name: "Id", table: "Users", type: "TEXT", maxLength: 36, nullable: false, oldClrType: typeof(long), oldType: "INTEGER") .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AlterColumn( name: "UserId", table: "Tokens", type: "TEXT", maxLength: 36, nullable: false, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AddColumn( name: "UserId", table: "Permissions", type: "TEXT", maxLength: 36, nullable: false, defaultValue: ""); migrationBuilder.AddPrimaryKey( name: "PK_Tokens", table: "Tokens", column: "Token"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropPrimaryKey( name: "PK_Tokens", table: "Tokens"); migrationBuilder.DropColumn( name: "UserId", table: "Permissions"); migrationBuilder.AlterColumn( name: "Id", table: "Users", type: "INTEGER", nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 36) .Annotation("Sqlite:Autoincrement", true); migrationBuilder.AlterColumn( name: "UserId", table: "Tokens", type: "INTEGER", nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 36); migrationBuilder.AddColumn( name: "Id", table: "Tokens", type: "INTEGER", nullable: false, defaultValue: 0L) .Annotation("Sqlite:Autoincrement", true); migrationBuilder.AddColumn( name: "OwnerId", table: "Permissions", type: "INTEGER", nullable: false, defaultValue: 0L); migrationBuilder.AddPrimaryKey( name: "PK_Tokens", table: "Tokens", column: "Id"); } } }