using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace asg_form.Migrations { /// public partial class sh1 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_AspNetUsers_F_Team_myteamId", table: "AspNetUsers"); migrationBuilder.AlterColumn( name: "opentime", table: "F_game", type: "text", nullable: false, oldClrType: typeof(DateTime), oldType: "timestamp with time zone"); migrationBuilder.AddColumn( name: "final_score", table: "F_game", type: "text", nullable: true); migrationBuilder.AddColumn( name: "judge_Id", table: "F_game", type: "integer", nullable: true); migrationBuilder.AddColumn( name: "referee_Id", table: "F_game", type: "integer", nullable: true); migrationBuilder.AlterColumn( name: "point", table: "AspNetUsers", type: "integer", nullable: true, oldClrType: typeof(int), oldType: "integer"); migrationBuilder.AlterColumn( name: "myteamId", table: "AspNetUsers", type: "bigint", nullable: true, oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AddColumn( name: "roleListCode", table: "AspNetUsers", type: "text", nullable: true); migrationBuilder.AddColumn( name: "roleListName", table: "AspNetUsers", type: "text", nullable: true); migrationBuilder.AlterColumn( name: "msg", table: "AspNetRoles", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AddForeignKey( name: "FK_AspNetUsers_F_Team_myteamId", table: "AspNetUsers", column: "myteamId", principalTable: "F_Team", principalColumn: "Id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_AspNetUsers_F_Team_myteamId", table: "AspNetUsers"); migrationBuilder.DropColumn( name: "final_score", table: "F_game"); migrationBuilder.DropColumn( name: "judge_Id", table: "F_game"); migrationBuilder.DropColumn( name: "referee_Id", table: "F_game"); migrationBuilder.DropColumn( name: "roleListCode", table: "AspNetUsers"); migrationBuilder.DropColumn( name: "roleListName", table: "AspNetUsers"); migrationBuilder.AlterColumn( name: "opentime", table: "F_game", type: "timestamp with time zone", nullable: false, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "point", table: "AspNetUsers", type: "integer", nullable: false, defaultValue: 0, oldClrType: typeof(int), oldType: "integer", oldNullable: true); migrationBuilder.AlterColumn( name: "myteamId", table: "AspNetUsers", type: "bigint", nullable: false, defaultValue: 0L, oldClrType: typeof(long), oldType: "bigint", oldNullable: true); migrationBuilder.AlterColumn( name: "msg", table: "AspNetRoles", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AddForeignKey( name: "FK_AspNetUsers_F_Team_myteamId", table: "AspNetUsers", column: "myteamId", principalTable: "F_Team", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } } }