using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Infrastructure.Migrations.AppDb { /// public partial class AddCrewWidgetConfig : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "CrewWidgetConfig", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), ChannelID = table.Column(type: "int", nullable: false), MemberID = table.Column(type: "int", nullable: false), Title = table.Column(type: "nvarchar(300)", maxLength: 300, nullable: false), Theme = table.Column(type: "int", nullable: false), Period = table.Column(type: "int", nullable: false), StartAt = table.Column(type: "datetime2", nullable: true), EndAt = table.Column(type: "datetime2", nullable: true), MaxDisplayCount = table.Column(type: "int", nullable: false), IsShowAmount = table.Column(type: "bit", nullable: false), IsShowDonationCount = table.Column(type: "bit", nullable: false), IsShowContributionRate = table.Column(type: "bit", nullable: false), IsShowMemberIcon = table.Column(type: "bit", nullable: false), IsActive = table.Column(type: "bit", nullable: false), BgColor = table.Column(type: "nvarchar(7)", maxLength: 7, nullable: false), TitleFontFamily = table.Column(type: "nvarchar(max)", nullable: true), TitleFontSizePx = table.Column(type: "int", nullable: false), TitleFontColor = table.Column(type: "nvarchar(7)", maxLength: 7, nullable: false), Rank1FontFamily = table.Column(type: "nvarchar(max)", nullable: true), Rank1FontSizePx = table.Column(type: "int", nullable: false), Rank1FontColor = table.Column(type: "nvarchar(7)", maxLength: 7, nullable: false), Rank2FontFamily = table.Column(type: "nvarchar(max)", nullable: true), Rank2FontSizePx = table.Column(type: "int", nullable: false), Rank2FontColor = table.Column(type: "nvarchar(7)", maxLength: 7, nullable: false), Rank3FontFamily = table.Column(type: "nvarchar(max)", nullable: true), Rank3FontSizePx = table.Column(type: "int", nullable: false), Rank3FontColor = table.Column(type: "nvarchar(7)", maxLength: 7, nullable: false), RowFontFamily = table.Column(type: "nvarchar(max)", nullable: true), RowFontSizePx = table.Column(type: "int", nullable: false), RowFontColor = table.Column(type: "nvarchar(7)", maxLength: 7, nullable: false), UpdatedAt = table.Column(type: "datetime2", nullable: true), CreatedAt = table.Column(type: "datetime2", nullable: false) }, constraints: table => { table.PrimaryKey("PK_CrewWidgetConfig", x => x.ID); table.ForeignKey( name: "FK_CrewWidgetConfig_Channel_ChannelID", column: x => x.ChannelID, principalTable: "Channel", principalColumn: "ID", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_CrewWidgetConfig_Member_MemberID", column: x => x.MemberID, principalTable: "Member", principalColumn: "ID"); }, comment: "크루 위젯 설정"); migrationBuilder.CreateIndex( name: "IX_CrewWidgetConfig_ChannelID", table: "CrewWidgetConfig", column: "ChannelID"); migrationBuilder.CreateIndex( name: "IX_CrewWidgetConfig_MemberID", table: "CrewWidgetConfig", column: "MemberID"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "CrewWidgetConfig"); } } }