using System; using Backend.Data; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Backend.Migrations { /// [DbContext(typeof(AwardsDbContext))] [Migration("20260625153000_AddCreatorRoleAndTeamTwitchBinding")] public partial class AddCreatorRoleAndTeamTwitchBinding : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "BoundTwitchDisplayName", table: "TeamMembers", type: "character varying(120)", maxLength: 120, nullable: true); migrationBuilder.AddColumn( name: "BoundTwitchUserId", table: "TeamMembers", type: "character varying(120)", maxLength: 120, nullable: true); migrationBuilder.AddColumn( name: "TwitchBoundAt", table: "TeamMembers", type: "timestamp with time zone", nullable: true); migrationBuilder.CreateIndex( name: "IX_TeamMembers_BoundTwitchUserId", table: "TeamMembers", column: "BoundTwitchUserId", unique: true, filter: "\"BoundTwitchUserId\" IS NOT NULL"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropIndex( name: "IX_TeamMembers_BoundTwitchUserId", table: "TeamMembers"); migrationBuilder.DropColumn( name: "BoundTwitchDisplayName", table: "TeamMembers"); migrationBuilder.DropColumn( name: "BoundTwitchUserId", table: "TeamMembers"); migrationBuilder.DropColumn( name: "TwitchBoundAt", table: "TeamMembers"); } } }