using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace NadekoBot.Db.Migrations.Sqlite { /// public partial class stickyroles : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "StickyRoles", table: "GuildConfigs", type: "INTEGER", nullable: false, defaultValue: false); migrationBuilder.CreateTable( name: "StickyRoles", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), GuildId = table.Column(type: "INTEGER", nullable: false), RoleIds = table.Column(type: "TEXT", nullable: false), UserId = table.Column(type: "INTEGER", nullable: false), DateAdded = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_StickyRoles", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_StickyRoles_GuildId_UserId", table: "StickyRoles", columns: new[] { "GuildId", "UserId" }, unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "StickyRoles"); migrationBuilder.DropColumn( name: "StickyRoles", table: "GuildConfigs"); } } }