using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace NadekoBot.Migrations.PostgreSql { /// public partial class nodiscrimandflagtranslate : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "discriminator", table: "discorduser"); migrationBuilder.CreateTable( name: "flagtranslatechannel", columns: table => new { id = table.Column(type: "integer", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), guildid = table.Column(type: "numeric(20,0)", nullable: false), channelid = table.Column(type: "numeric(20,0)", nullable: false), dateadded = table.Column(type: "timestamp without time zone", nullable: true) }, constraints: table => { table.PrimaryKey("pk_flagtranslatechannel", x => x.id); }); migrationBuilder.CreateIndex( name: "ix_flagtranslatechannel_guildid_channelid", table: "flagtranslatechannel", columns: new[] { "guildid", "channelid" }, unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "flagtranslatechannel"); migrationBuilder.AddColumn( name: "discriminator", table: "discorduser", type: "text", nullable: true); } } }