using Microsoft.EntityFrameworkCore.Migrations; using System; using System.Collections.Generic; namespace NadekoBot.Migrations { public partial class xprrfix : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable("XpRoleReward"); migrationBuilder.CreateTable( name: "XpRoleReward", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), DateAdded = table.Column(type: "TEXT", nullable: true), Level = table.Column(type: "INTEGER", nullable: false), RoleId = table.Column(type: "INTEGER", nullable: false), XpSettingsId = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_XpRoleReward", x => x.Id); table.ForeignKey( name: "FK_XpRoleReward_XpSettings_XpSettingsId", column: x => x.XpSettingsId, principalTable: "XpSettings", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_XpRoleReward_XpSettingsId_Level", table: "XpRoleReward", columns: new[] { "XpSettingsId", "Level" }, unique: true); } protected override void Down(MigrationBuilder migrationBuilder) { } } }