using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Nuuru.Server.Migrations { /// public partial class RemoveClanEmotes : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ClanEmotes"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "ClanEmotes", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), ClanId = table.Column(type: "INTEGER", nullable: false), CreatedAt = table.Column(type: "TEXT", nullable: false), Name = table.Column(type: "TEXT", maxLength: 30, nullable: false), StorageIdentifier = table.Column(type: "TEXT", nullable: false) }, constraints: table => { table.PrimaryKey("PK_ClanEmotes", x => x.Id); table.ForeignKey( name: "FK_ClanEmotes_Clans_ClanId", column: x => x.ClanId, principalTable: "Clans", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_ClanEmotes_ClanId_Name", table: "ClanEmotes", columns: new[] { "ClanId", "Name" }, unique: true); migrationBuilder.CreateIndex( name: "IX_ClanEmotes_Name", table: "ClanEmotes", column: "Name", unique: true); } } }