mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
Database squash
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class stondel : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "deletestreamonlinemessage",
|
||||
table: "guildconfigs",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "deletestreamonlinemessage",
|
||||
table: "guildconfigs");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,41 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class bank : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "bankusers",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
userid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
balance = table.Column<long>(type: "bigint", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_bankusers", x => x.id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_bankusers_userid",
|
||||
table: "bankusers",
|
||||
column: "userid",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "bankusers");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,120 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class newrero : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "reactionroles",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
guildid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
channelid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
messageid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
emote = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
roleid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
group = table.Column<int>(type: "int", nullable: false),
|
||||
levelreq = table.Column<int>(type: "int", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_reactionroles", x => x.id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_reactionroles_guildid",
|
||||
table: "reactionroles",
|
||||
column: "guildid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_reactionroles_messageid_emote",
|
||||
table: "reactionroles",
|
||||
columns: new[] { "messageid", "emote" },
|
||||
unique: true);
|
||||
|
||||
MigrationQueries.MigrateRero(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "reactionrole");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "reactionrolemessage");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "reactionroles");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "reactionrolemessage",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
guildconfigid = table.Column<int>(type: "int", nullable: false),
|
||||
channelid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
exclusive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
index = table.Column<int>(type: "int", nullable: false),
|
||||
messageid = table.Column<ulong>(type: "bigint unsigned", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_reactionrolemessage", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_reactionrolemessage_guildconfigs_guildconfigid",
|
||||
column: x => x.guildconfigid,
|
||||
principalTable: "guildconfigs",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "reactionrole",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
emotename = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
reactionrolemessageid = table.Column<int>(type: "int", nullable: true),
|
||||
roleid = table.Column<ulong>(type: "bigint unsigned", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_reactionrole", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_reactionrole_reactionrolemessage_reactionrolemessageid",
|
||||
column: x => x.reactionrolemessageid,
|
||||
principalTable: "reactionrolemessage",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_reactionrole_reactionrolemessageid",
|
||||
table: "reactionrole",
|
||||
column: "reactionrolemessageid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_reactionrolemessage_guildconfigid",
|
||||
table: "reactionrolemessage",
|
||||
column: "guildconfigid");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,175 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class patronagesystem : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "patreonuserid",
|
||||
table: "rewardedusers",
|
||||
newName: "platformuserid");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "ix_rewardedusers_patreonuserid",
|
||||
table: "rewardedusers",
|
||||
newName: "ix_rewardedusers_platformuserid");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "xp",
|
||||
table: "userxpstats",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "awardedxp",
|
||||
table: "userxpstats",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "amountrewardedthismonth",
|
||||
table: "rewardedusers",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "verboseerrors",
|
||||
table: "guildconfigs",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: true,
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "tinyint(1)");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "totalxp",
|
||||
table: "discorduser",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int",
|
||||
oldDefaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "patronquotas",
|
||||
columns: table => new
|
||||
{
|
||||
userid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
featuretype = table.Column<int>(type: "int", nullable: false),
|
||||
feature = table.Column<string>(type: "varchar(255)", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
hourlycount = table.Column<uint>(type: "int unsigned", nullable: false),
|
||||
dailycount = table.Column<uint>(type: "int unsigned", nullable: false),
|
||||
monthlycount = table.Column<uint>(type: "int unsigned", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_patronquotas", x => new { x.userid, x.featuretype, x.feature });
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "patrons",
|
||||
columns: table => new
|
||||
{
|
||||
userid = table.Column<ulong>(type: "bigint unsigned", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
uniqueplatformuserid = table.Column<string>(type: "varchar(255)", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
amountcents = table.Column<int>(type: "int", nullable: false),
|
||||
lastcharge = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
validthru = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_patrons", x => x.userid);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_patronquotas_userid",
|
||||
table: "patronquotas",
|
||||
column: "userid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_patrons_uniqueplatformuserid",
|
||||
table: "patrons",
|
||||
column: "uniqueplatformuserid",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "patronquotas");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "patrons");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "platformuserid",
|
||||
table: "rewardedusers",
|
||||
newName: "patreonuserid");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "ix_rewardedusers_platformuserid",
|
||||
table: "rewardedusers",
|
||||
newName: "ix_rewardedusers_patreonuserid");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "xp",
|
||||
table: "userxpstats",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "awardedxp",
|
||||
table: "userxpstats",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "amountrewardedthismonth",
|
||||
table: "rewardedusers",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "verboseerrors",
|
||||
table: "guildconfigs",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "tinyint(1)",
|
||||
oldDefaultValue: true);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "totalxp",
|
||||
table: "discorduser",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint",
|
||||
oldDefaultValue: 0L);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class stondeldbcache : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "streamonlinemessages",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
channelid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
messageid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
type = table.Column<int>(type: "int", nullable: false),
|
||||
name = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_streamonlinemessages", x => x.id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "streamonlinemessages");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class logwarns : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "logwarnsid",
|
||||
table: "logsettings",
|
||||
type: "bigint unsigned",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "logwarnsid",
|
||||
table: "logsettings");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,44 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class xpitemshop : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "xpshopowneditem",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
userid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
itemtype = table.Column<int>(type: "int", nullable: false),
|
||||
isusing = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
itemkey = table.Column<string>(type: "varchar(255)", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_xpshopowneditem", x => x.id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_xpshopowneditem_userid_itemtype_itemkey",
|
||||
table: "xpshopowneditem",
|
||||
columns: new[] { "userid", "itemtype", "itemkey" },
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "xpshopowneditem");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class linkonlychannels : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "type",
|
||||
table: "imageonlychannels",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "type",
|
||||
table: "imageonlychannels");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,48 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class removeobsoletexpcolumns : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "lastlevelup",
|
||||
table: "userxpstats");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "lastlevelup",
|
||||
table: "discorduser");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "lastxpgain",
|
||||
table: "discorduser");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "lastlevelup",
|
||||
table: "userxpstats",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
defaultValueSql: "(UTC_TIMESTAMP)");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "lastlevelup",
|
||||
table: "discorduser",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
defaultValueSql: "(UTC_TIMESTAMP)");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "lastxpgain",
|
||||
table: "discorduser",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
defaultValueSql: "(UTC_TIMESTAMP - INTERVAL 1 year)");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class banprune : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "prunedays",
|
||||
table: "bantemplates",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "prunedays",
|
||||
table: "bantemplates");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class shoprolereq : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "rolerequirement",
|
||||
table: "shopentry",
|
||||
type: "bigint unsigned",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "rolerequirement",
|
||||
table: "shopentry");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,41 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class autopub : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "autopublishchannel",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
guildid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
channelid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_autopublishchannel", x => x.id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_autopublishchannel_guildid",
|
||||
table: "autopublishchannel",
|
||||
column: "guildid",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "autopublishchannel");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,43 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class gamblingstats : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "gamblingstats",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
feature = table.Column<string>(type: "varchar(255)", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
bet = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
|
||||
paidout = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_gamblingstats", x => x.id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_gamblingstats_feature",
|
||||
table: "gamblingstats",
|
||||
column: "feature",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "gamblingstats");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class toggleglobalexpressions : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "disableglobalexpressions",
|
||||
table: "guildconfigs",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "disableglobalexpressions",
|
||||
table: "guildconfigs");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,35 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
public partial class logthread : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "threadcreatedid",
|
||||
table: "logsettings",
|
||||
type: "bigint unsigned",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "threaddeletedid",
|
||||
table: "logsettings",
|
||||
type: "bigint unsigned",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "threadcreatedid",
|
||||
table: "logsettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "threaddeletedid",
|
||||
table: "logsettings");
|
||||
}
|
||||
}
|
||||
}
|
@@ -8,12 +8,13 @@ using NadekoBot.Services.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
namespace NadekoBot.Db.Migrations.Mysql
|
||||
{
|
||||
[DbContext(typeof(MysqlContext))]
|
||||
[Migration("20221122204432_feed-text")]
|
||||
partial class feedtext
|
||||
partial class init_v5
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
@@ -21,7 +22,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasAnnotation("ProductVersion", "6.0.7")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.AutoPublishChannel", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.AutoPublishChannel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +51,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("autopublishchannel", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.BankUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -79,7 +80,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("bankusers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -98,7 +99,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubapplicants", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -117,7 +118,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubbans", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -164,7 +165,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -240,7 +241,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("discorduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -284,7 +285,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("followedstream", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronQuota", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronQuota", b =>
|
||||
{
|
||||
b.Property<ulong>("UserId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
@@ -319,7 +320,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("patronquotas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronUser", b =>
|
||||
{
|
||||
b.Property<ulong>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -352,7 +353,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.StreamOnlineMessage", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.StreamOnlineMessage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -385,7 +386,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("streamonlinemessages", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.XpShopOwnedItem", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.XpShopOwnedItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1023,34 +1024,6 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("filterchannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.Property<string>("Word")
|
||||
.HasColumnType("longtext")
|
||||
.HasColumnName("word");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_filteredword");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_filteredword_guildconfigid");
|
||||
|
||||
b.ToTable("filteredword", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterLinksChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1107,6 +1080,62 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("filterwordschannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.Property<string>("Word")
|
||||
.HasColumnType("longtext")
|
||||
.HasColumnName("word");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_filteredword");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_filteredword_guildconfigid");
|
||||
|
||||
b.ToTable("filteredword", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<ulong>("ChannelId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
.HasColumnName("channelid");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_gcchannelid");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_gcchannelid_guildconfigid");
|
||||
|
||||
b.ToTable("gcchannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GamblingStats", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1140,34 +1169,6 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("gamblingstats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<ulong>("ChannelId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
.HasColumnName("channelid");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_gcchannelid");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_gcchannelid_guildconfigid");
|
||||
|
||||
b.ToTable("gcchannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GroupName", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -3021,16 +3022,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("xpsettings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Applicants")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubapplicants_clubs_clubid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3042,16 +3043,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Bans")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubbans_clubs_clubid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3063,20 +3064,20 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Owner")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Owner")
|
||||
.WithOne()
|
||||
.HasForeignKey("Nadeko.Bot.Db.Models.ClubInfo", "OwnerId")
|
||||
.HasForeignKey("NadekoBot.Db.Models.ClubInfo", "OwnerId")
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("fk_clubs_discorduser_ownerid");
|
||||
|
||||
b.Navigation("Owner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Members")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
@@ -3085,7 +3086,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("Club");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FollowedStreams")
|
||||
@@ -3199,14 +3200,6 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FilteredWords")
|
||||
.HasForeignKey("GuildConfigId")
|
||||
.HasConstraintName("fk_filteredword_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterLinksChannelId", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
@@ -3223,6 +3216,14 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FilteredWords")
|
||||
.HasForeignKey("GuildConfigId")
|
||||
.HasConstraintName("fk_filteredword_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig")
|
||||
@@ -3402,17 +3403,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Affinity")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Affinity")
|
||||
.WithMany()
|
||||
.HasForeignKey("AffinityId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_affinityid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Claimer")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Claimer")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClaimerId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_claimerid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Waifu")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Waifu")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3438,17 +3439,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "New")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "New")
|
||||
.WithMany()
|
||||
.HasForeignKey("NewId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_newid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Old")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Old")
|
||||
.WithMany()
|
||||
.HasForeignKey("OldId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_oldid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3506,7 +3507,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("GuildConfig");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Navigation("Applicants");
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ using NadekoBot.Services.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
namespace NadekoBot.Db.Migrations.Mysql
|
||||
{
|
||||
[DbContext(typeof(MysqlContext))]
|
||||
partial class MysqlContextModelSnapshot : ModelSnapshot
|
||||
@@ -16,10 +16,10 @@ namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.7")
|
||||
.HasAnnotation("ProductVersion", "7.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.AutoPublishChannel", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.AutoPublishChannel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -48,7 +48,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("autopublishchannel", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.BankUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -77,7 +77,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("bankusers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -96,7 +96,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubapplicants", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -115,7 +115,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubbans", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -162,7 +162,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -238,7 +238,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("discorduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -282,7 +282,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("followedstream", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronQuota", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronQuota", b =>
|
||||
{
|
||||
b.Property<ulong>("UserId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
@@ -317,7 +317,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("patronquotas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronUser", b =>
|
||||
{
|
||||
b.Property<ulong>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -350,7 +350,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.StreamOnlineMessage", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.StreamOnlineMessage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -383,7 +383,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("streamonlinemessages", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.XpShopOwnedItem", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.XpShopOwnedItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1021,34 +1021,6 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("filterchannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.Property<string>("Word")
|
||||
.HasColumnType("longtext")
|
||||
.HasColumnName("word");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_filteredword");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_filteredword_guildconfigid");
|
||||
|
||||
b.ToTable("filteredword", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterLinksChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1105,6 +1077,62 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("filterwordschannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.Property<string>("Word")
|
||||
.HasColumnType("longtext")
|
||||
.HasColumnName("word");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_filteredword");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_filteredword_guildconfigid");
|
||||
|
||||
b.ToTable("filteredword", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<ulong>("ChannelId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
.HasColumnName("channelid");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_gcchannelid");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_gcchannelid_guildconfigid");
|
||||
|
||||
b.ToTable("gcchannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GamblingStats", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1138,34 +1166,6 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("gamblingstats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<ulong>("ChannelId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
.HasColumnName("channelid");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_gcchannelid");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_gcchannelid_guildconfigid");
|
||||
|
||||
b.ToTable("gcchannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GroupName", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -3019,16 +3019,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("xpsettings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Applicants")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubapplicants_clubs_clubid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3040,16 +3040,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Bans")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubbans_clubs_clubid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3061,20 +3061,20 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Owner")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Owner")
|
||||
.WithOne()
|
||||
.HasForeignKey("Nadeko.Bot.Db.Models.ClubInfo", "OwnerId")
|
||||
.HasForeignKey("NadekoBot.Db.Models.ClubInfo", "OwnerId")
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("fk_clubs_discorduser_ownerid");
|
||||
|
||||
b.Navigation("Owner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Members")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
@@ -3083,7 +3083,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("Club");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FollowedStreams")
|
||||
@@ -3197,14 +3197,6 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FilteredWords")
|
||||
.HasForeignKey("GuildConfigId")
|
||||
.HasConstraintName("fk_filteredword_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterLinksChannelId", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
@@ -3221,6 +3213,14 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FilteredWords")
|
||||
.HasForeignKey("GuildConfigId")
|
||||
.HasConstraintName("fk_filteredword_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig")
|
||||
@@ -3400,17 +3400,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Affinity")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Affinity")
|
||||
.WithMany()
|
||||
.HasForeignKey("AffinityId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_affinityid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Claimer")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Claimer")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClaimerId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_claimerid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Waifu")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Waifu")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3436,17 +3436,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "New")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "New")
|
||||
.WithMany()
|
||||
.HasForeignKey("NewId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_newid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Old")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Old")
|
||||
.WithMany()
|
||||
.HasForeignKey("OldId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_oldid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3504,7 +3504,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("GuildConfig");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Navigation("Applicants");
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class stondel : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "deletestreamonlinemessage",
|
||||
table: "guildconfigs",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "deletestreamonlinemessage",
|
||||
table: "guildconfigs");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,40 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class bank : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "bankusers",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
userid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
balance = table.Column<long>(type: "bigint", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_bankusers", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_bankusers_userid",
|
||||
table: "bankusers",
|
||||
column: "userid",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "bankusers");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,114 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class newrero : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "reactionroles",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
guildid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
channelid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
messageid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
emote = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
|
||||
roleid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
group = table.Column<int>(type: "integer", nullable: false),
|
||||
levelreq = table.Column<int>(type: "integer", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_reactionroles", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_reactionroles_guildid",
|
||||
table: "reactionroles",
|
||||
column: "guildid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_reactionroles_messageid_emote",
|
||||
table: "reactionroles",
|
||||
columns: new[] { "messageid", "emote" },
|
||||
unique: true);
|
||||
|
||||
MigrationQueries.MigrateRero(migrationBuilder);
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "reactionrole");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "reactionrolemessage");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "reactionroles");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "reactionrolemessage",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
guildconfigid = table.Column<int>(type: "integer", nullable: false),
|
||||
channelid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
exclusive = table.Column<bool>(type: "boolean", nullable: false),
|
||||
index = table.Column<int>(type: "integer", nullable: false),
|
||||
messageid = table.Column<decimal>(type: "numeric(20,0)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_reactionrolemessage", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_reactionrolemessage_guildconfigs_guildconfigid",
|
||||
column: x => x.guildconfigid,
|
||||
principalTable: "guildconfigs",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "reactionrole",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
emotename = table.Column<string>(type: "text", nullable: true),
|
||||
reactionrolemessageid = table.Column<int>(type: "integer", nullable: true),
|
||||
roleid = table.Column<decimal>(type: "numeric(20,0)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_reactionrole", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_reactionrole_reactionrolemessage_reactionrolemessageid",
|
||||
column: x => x.reactionrolemessageid,
|
||||
principalTable: "reactionrolemessage",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_reactionrole_reactionrolemessageid",
|
||||
table: "reactionrole",
|
||||
column: "reactionrolemessageid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_reactionrolemessage_guildconfigid",
|
||||
table: "reactionrolemessage",
|
||||
column: "guildconfigid");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,169 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class patronagesystem : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "patreonuserid",
|
||||
table: "rewardedusers",
|
||||
newName: "platformuserid");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "ix_rewardedusers_patreonuserid",
|
||||
table: "rewardedusers",
|
||||
newName: "ix_rewardedusers_platformuserid");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "xp",
|
||||
table: "userxpstats",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "awardedxp",
|
||||
table: "userxpstats",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "amountrewardedthismonth",
|
||||
table: "rewardedusers",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "verboseerrors",
|
||||
table: "guildconfigs",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: true,
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "boolean");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "totalxp",
|
||||
table: "discorduser",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer",
|
||||
oldDefaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "patronquotas",
|
||||
columns: table => new
|
||||
{
|
||||
userid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
featuretype = table.Column<int>(type: "integer", nullable: false),
|
||||
feature = table.Column<string>(type: "text", nullable: false),
|
||||
hourlycount = table.Column<long>(type: "bigint", nullable: false),
|
||||
dailycount = table.Column<long>(type: "bigint", nullable: false),
|
||||
monthlycount = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_patronquotas", x => new { x.userid, x.featuretype, x.feature });
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "patrons",
|
||||
columns: table => new
|
||||
{
|
||||
userid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
uniqueplatformuserid = table.Column<string>(type: "text", nullable: true),
|
||||
amountcents = table.Column<int>(type: "integer", nullable: false),
|
||||
lastcharge = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
validthru = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_patrons", x => x.userid);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_patronquotas_userid",
|
||||
table: "patronquotas",
|
||||
column: "userid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_patrons_uniqueplatformuserid",
|
||||
table: "patrons",
|
||||
column: "uniqueplatformuserid",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "patronquotas");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "patrons");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "platformuserid",
|
||||
table: "rewardedusers",
|
||||
newName: "patreonuserid");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "ix_rewardedusers_platformuserid",
|
||||
table: "rewardedusers",
|
||||
newName: "ix_rewardedusers_patreonuserid");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "xp",
|
||||
table: "userxpstats",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "awardedxp",
|
||||
table: "userxpstats",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "amountrewardedthismonth",
|
||||
table: "rewardedusers",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "verboseerrors",
|
||||
table: "guildconfigs",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "boolean",
|
||||
oldDefaultValue: true);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "totalxp",
|
||||
table: "discorduser",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint",
|
||||
oldDefaultValue: 0L);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,36 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class stondeldbcache : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "streamonlinemessages",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
channelid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
messageid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
type = table.Column<int>(type: "integer", nullable: false),
|
||||
name = table.Column<string>(type: "text", nullable: true),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_streamonlinemessages", x => x.id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "streamonlinemessages");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class logwarns : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "logwarnsid",
|
||||
table: "logsettings",
|
||||
type: "numeric(20,0)",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "logwarnsid",
|
||||
table: "logsettings");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,42 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class xpitemshop : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "xpshopowneditem",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
userid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
itemtype = table.Column<int>(type: "integer", nullable: false),
|
||||
isusing = table.Column<bool>(type: "boolean", nullable: false),
|
||||
itemkey = table.Column<string>(type: "text", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_xpshopowneditem", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_xpshopowneditem_userid_itemtype_itemkey",
|
||||
table: "xpshopowneditem",
|
||||
columns: new[] { "userid", "itemtype", "itemkey" },
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "xpshopowneditem");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class linkonlychannels : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "type",
|
||||
table: "imageonlychannels",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "type",
|
||||
table: "imageonlychannels");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class banprune : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "prunedays",
|
||||
table: "bantemplates",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "prunedays",
|
||||
table: "bantemplates");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class shoprolereq : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "rolerequirement",
|
||||
table: "shopentry",
|
||||
type: "numeric(20,0)",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "rolerequirement",
|
||||
table: "shopentry");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,50 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class autopub : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "rolerequirement",
|
||||
table: "shopentry",
|
||||
type: "numeric(20,0)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "autopublishchannel",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
guildid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
channelid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_autopublishchannel", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_autopublishchannel_guildid",
|
||||
table: "autopublishchannel",
|
||||
column: "guildid",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "autopublishchannel");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "rolerequirement",
|
||||
table: "shopentry");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,41 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class gamblingstats : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "gamblingstats",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
feature = table.Column<string>(type: "text", nullable: true),
|
||||
bet = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
paidout = table.Column<decimal>(type: "numeric", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_gamblingstats", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_gamblingstats_feature",
|
||||
table: "gamblingstats",
|
||||
column: "feature",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "gamblingstats");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class toggleglobalexpressions : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "disableglobalexpressions",
|
||||
table: "guildconfigs",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "disableglobalexpressions",
|
||||
table: "guildconfigs");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,35 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class logthread : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "threadcreatedid",
|
||||
table: "logsettings",
|
||||
type: "numeric(20,0)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "threaddeletedid",
|
||||
table: "logsettings",
|
||||
type: "numeric(20,0)",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "threadcreatedid",
|
||||
table: "logsettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "threaddeletedid",
|
||||
table: "logsettings");
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,25 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
public partial class feedtext : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "message",
|
||||
table: "feedsub",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "message",
|
||||
table: "feedsub");
|
||||
}
|
||||
}
|
||||
}
|
@@ -9,11 +9,11 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
namespace NadekoBot.Db.Migrations
|
||||
{
|
||||
[DbContext(typeof(PostgreSqlContext))]
|
||||
[Migration("20221122204423_feed-text")]
|
||||
partial class feedtext
|
||||
partial class init_v5
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -21,10 +21,10 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.7")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.AutoPublishChannel", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.AutoPublishChannel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -55,7 +55,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("autopublishchannel", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.BankUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -86,7 +86,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("bankusers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("integer")
|
||||
@@ -105,7 +105,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("clubapplicants", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("integer")
|
||||
@@ -124,7 +124,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("clubbans", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -172,7 +172,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("clubs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -250,7 +250,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("discorduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -296,7 +296,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("followedstream", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronQuota", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronQuota", b =>
|
||||
{
|
||||
b.Property<decimal>("UserId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
@@ -331,7 +331,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("patronquotas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronUser", b =>
|
||||
{
|
||||
b.Property<decimal>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -364,7 +364,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.StreamOnlineMessage", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.StreamOnlineMessage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -399,7 +399,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("streamonlinemessages", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.XpShopOwnedItem", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.XpShopOwnedItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1073,36 +1073,6 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("filterchannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.Property<string>("Word")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("word");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_filteredword");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_filteredword_guildconfigid");
|
||||
|
||||
b.ToTable("filteredword", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterLinksChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1163,6 +1133,66 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("filterwordschannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.Property<string>("Word")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("word");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_filteredword");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_filteredword_guildconfigid");
|
||||
|
||||
b.ToTable("filteredword", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<decimal>("ChannelId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("channelid");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_gcchannelid");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_gcchannelid_guildconfigid");
|
||||
|
||||
b.ToTable("gcchannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GamblingStats", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1198,36 +1228,6 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("gamblingstats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<decimal>("ChannelId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("channelid");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_gcchannelid");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_gcchannelid_guildconfigid");
|
||||
|
||||
b.ToTable("gcchannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GroupName", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -3169,16 +3169,16 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("xpsettings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Applicants")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubapplicants_clubs_clubid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3190,16 +3190,16 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Bans")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubbans_clubs_clubid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3211,20 +3211,20 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Owner")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Owner")
|
||||
.WithOne()
|
||||
.HasForeignKey("Nadeko.Bot.Db.Models.ClubInfo", "OwnerId")
|
||||
.HasForeignKey("NadekoBot.Db.Models.ClubInfo", "OwnerId")
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("fk_clubs_discorduser_ownerid");
|
||||
|
||||
b.Navigation("Owner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Members")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
@@ -3233,7 +3233,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.Navigation("Club");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FollowedStreams")
|
||||
@@ -3347,14 +3347,6 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
.HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FilteredWords")
|
||||
.HasForeignKey("GuildConfigId")
|
||||
.HasConstraintName("fk_filteredword_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterLinksChannelId", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
@@ -3371,6 +3363,14 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
.HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FilteredWords")
|
||||
.HasForeignKey("GuildConfigId")
|
||||
.HasConstraintName("fk_filteredword_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig")
|
||||
@@ -3550,17 +3550,17 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Affinity")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Affinity")
|
||||
.WithMany()
|
||||
.HasForeignKey("AffinityId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_affinityid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Claimer")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Claimer")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClaimerId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_claimerid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Waifu")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Waifu")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3586,17 +3586,17 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "New")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "New")
|
||||
.WithMany()
|
||||
.HasForeignKey("NewId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_newid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Old")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Old")
|
||||
.WithMany()
|
||||
.HasForeignKey("OldId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_oldid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3654,7 +3654,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.Navigation("GuildConfig");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Navigation("Applicants");
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
namespace NadekoBot.Db.Migrations
|
||||
{
|
||||
[DbContext(typeof(PostgreSqlContext))]
|
||||
partial class PostgreSqlContextModelSnapshot : ModelSnapshot
|
||||
@@ -22,7 +22,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.AutoPublishChannel", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.AutoPublishChannel", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -53,7 +53,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("autopublishchannel", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.BankUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -84,7 +84,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("bankusers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("integer")
|
||||
@@ -103,7 +103,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("clubapplicants", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("integer")
|
||||
@@ -122,7 +122,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("clubbans", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -170,7 +170,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("clubs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -248,7 +248,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("discorduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -294,7 +294,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("followedstream", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronQuota", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronQuota", b =>
|
||||
{
|
||||
b.Property<decimal>("UserId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
@@ -329,7 +329,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("patronquotas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronUser", b =>
|
||||
{
|
||||
b.Property<decimal>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -362,7 +362,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.StreamOnlineMessage", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.StreamOnlineMessage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -397,7 +397,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("streamonlinemessages", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.XpShopOwnedItem", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.XpShopOwnedItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1071,36 +1071,6 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("filterchannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.Property<string>("Word")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("word");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_filteredword");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_filteredword_guildconfigid");
|
||||
|
||||
b.ToTable("filteredword", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterLinksChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1161,6 +1131,66 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("filterwordschannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.Property<string>("Word")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("word");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_filteredword");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_filteredword_guildconfigid");
|
||||
|
||||
b.ToTable("filteredword", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<decimal>("ChannelId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("channelid");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_gcchannelid");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_gcchannelid_guildconfigid");
|
||||
|
||||
b.ToTable("gcchannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GamblingStats", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1196,36 +1226,6 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("gamblingstats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<decimal>("ChannelId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("channelid");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int?>("GuildConfigId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_gcchannelid");
|
||||
|
||||
b.HasIndex("GuildConfigId")
|
||||
.HasDatabaseName("ix_gcchannelid_guildconfigid");
|
||||
|
||||
b.ToTable("gcchannelid", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GroupName", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -3167,16 +3167,16 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.ToTable("xpsettings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Applicants")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubapplicants_clubs_clubid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3188,16 +3188,16 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Bans")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubbans_clubs_clubid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3209,20 +3209,20 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Owner")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Owner")
|
||||
.WithOne()
|
||||
.HasForeignKey("Nadeko.Bot.Db.Models.ClubInfo", "OwnerId")
|
||||
.HasForeignKey("NadekoBot.Db.Models.ClubInfo", "OwnerId")
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("fk_clubs_discorduser_ownerid");
|
||||
|
||||
b.Navigation("Owner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Members")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
@@ -3231,7 +3231,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.Navigation("Club");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FollowedStreams")
|
||||
@@ -3345,14 +3345,6 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
.HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FilteredWords")
|
||||
.HasForeignKey("GuildConfigId")
|
||||
.HasConstraintName("fk_filteredword_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterLinksChannelId", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
@@ -3369,6 +3361,14 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
.HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FilteredWords")
|
||||
.HasForeignKey("GuildConfigId")
|
||||
.HasConstraintName("fk_filteredword_guildconfigs_guildconfigid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig")
|
||||
@@ -3548,17 +3548,17 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Affinity")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Affinity")
|
||||
.WithMany()
|
||||
.HasForeignKey("AffinityId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_affinityid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Claimer")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Claimer")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClaimerId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_claimerid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Waifu")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Waifu")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3584,17 +3584,17 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b =>
|
||||
{
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "New")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "New")
|
||||
.WithMany()
|
||||
.HasForeignKey("NewId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_newid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Old")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Old")
|
||||
.WithMany()
|
||||
.HasForeignKey("OldId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_oldid");
|
||||
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3652,7 +3652,7 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
b.Navigation("GuildConfig");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Navigation("Applicants");
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,493 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class cleanup : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_GuildConfigs_Permission_RootPermissionId",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.Sql("UPDATE Permission SET NextId = NULL;");
|
||||
|
||||
migrationBuilder.Sql("DELETE FROM FilteredWord WHERE GuildConfigId NOT IN (SELECT Id from GuildConfigs)");
|
||||
migrationBuilder.Sql("DELETE FROM FilterChannelId WHERE GuildConfigId NOT IN (SELECT Id from GuildConfigs)");
|
||||
migrationBuilder.Sql("DELETE FROM CommandCooldown WHERE GuildConfigId NOT IN (SELECT Id from GuildConfigs)");
|
||||
|
||||
// fix for users who edited their waifuinfo table manually and are unable to update
|
||||
migrationBuilder.Sql("DELETE FROM WaifuInfo where WaifuId not in (SELECT Id from DiscordUser);");
|
||||
|
||||
// fix for users who deleted clubs manually and are unable to update now
|
||||
migrationBuilder.Sql("UPDATE DiscordUser SET ClubId = null WHERE ClubId is not null and ClubId not in (SELECT Id from Clubs);");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ChannelCreated",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ChannelDestroyed",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ChannelId",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ChannelUpdated",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsLogging",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LogUserPresence",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LogVoicePresence",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MessageDeleted",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MessageUpdated",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UserBanned",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UserJoined",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UserLeft",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UserPresenceChannelId",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UserUnbanned",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UserUpdated",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "VoicePresenceChannelId",
|
||||
table: "LogSettings");
|
||||
|
||||
// FUTURE cleanup guildconfigs which have logsettings id set to null
|
||||
migrationBuilder.Sql("UPDATE GuildConfigs SET LogSettingId = null WHERE LogSettingId NOT IN (SELECT Id from LogSettings)");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Permission");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Stakes");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_GuildConfigs_RootPermissionId",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NotifyMessage",
|
||||
table: "XpSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "XpRoleRewardExclusive",
|
||||
table: "XpSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Item",
|
||||
table: "WaifuItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Price",
|
||||
table: "WaifuItem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UseCount",
|
||||
table: "Quotes");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AutoAssignRoleId",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AutoDcFromVc",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DefaultMusicVolume",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RootPermissionId",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "VoicePlusTextEnabled",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsRegex",
|
||||
table: "CustomReactions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OwnerOnly",
|
||||
table: "CustomReactions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UseCount",
|
||||
table: "CustomReactions");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "NotifyOnLevelUp",
|
||||
table: "DiscordUser",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "LastXpGain",
|
||||
table: "DiscordUser",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValueSql: "datetime('now', '-1 years')",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "TEXT");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "LastLevelUp",
|
||||
table: "DiscordUser",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValueSql: "datetime('now')",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "TEXT",
|
||||
oldDefaultValue: new DateTime(2017, 9, 21, 20, 53, 13, 305, DateTimeKind.Local));
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "IsClubAdmin",
|
||||
table: "DiscordUser",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false,
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "INTEGER");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "NotifyMessage",
|
||||
table: "XpSettings",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "XpRoleRewardExclusive",
|
||||
table: "XpSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Item",
|
||||
table: "WaifuItem",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Price",
|
||||
table: "WaifuItem",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "UseCount",
|
||||
table: "Quotes",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0ul);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "ChannelCreated",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "ChannelDestroyed",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "ChannelId",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0ul);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "ChannelUpdated",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsLogging",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "LogUserPresence",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "LogVoicePresence",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "MessageDeleted",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "MessageUpdated",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UserBanned",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UserJoined",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UserLeft",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "UserPresenceChannelId",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0ul);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UserUnbanned",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UserUpdated",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "VoicePresenceChannelId",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0ul);
|
||||
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "AutoAssignRoleId",
|
||||
table: "GuildConfigs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0ul);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "AutoDcFromVc",
|
||||
table: "GuildConfigs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "DefaultMusicVolume",
|
||||
table: "GuildConfigs",
|
||||
type: "REAL",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "RootPermissionId",
|
||||
table: "GuildConfigs",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "VoicePlusTextEnabled",
|
||||
table: "GuildConfigs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "NotifyOnLevelUp",
|
||||
table: "DiscordUser",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER",
|
||||
oldDefaultValue: 0);
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "LastXpGain",
|
||||
table: "DiscordUser",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "TEXT",
|
||||
oldDefaultValueSql: "datetime('now', '-1 years')");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "LastLevelUp",
|
||||
table: "DiscordUser",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(2017, 9, 21, 20, 53, 13, 305, DateTimeKind.Local),
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "TEXT",
|
||||
oldDefaultValueSql: "datetime('now')");
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "IsClubAdmin",
|
||||
table: "DiscordUser",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "INTEGER",
|
||||
oldDefaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsRegex",
|
||||
table: "CustomReactions",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "OwnerOnly",
|
||||
table: "CustomReactions",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "UseCount",
|
||||
table: "CustomReactions",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0ul);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Permission",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
NextId = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
PrimaryTarget = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
PrimaryTargetId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
SecondaryTarget = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
SecondaryTargetName = table.Column<string>(type: "TEXT", nullable: true),
|
||||
State = table.Column<bool>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Permission", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Permission_Permission_NextId",
|
||||
column: x => x.NextId,
|
||||
principalTable: "Permission",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Stakes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Amount = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
Source = table.Column<string>(type: "TEXT", nullable: true),
|
||||
UserId = table.Column<ulong>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Stakes", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_GuildConfigs_RootPermissionId",
|
||||
table: "GuildConfigs",
|
||||
column: "RootPermissionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Permission_NextId",
|
||||
table: "Permission",
|
||||
column: "NextId",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_GuildConfigs_Permission_RootPermissionId",
|
||||
table: "GuildConfigs",
|
||||
column: "RootPermissionId",
|
||||
principalTable: "Permission",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,37 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class rerocascade : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ReactionRole_ReactionRoleMessage_ReactionRoleMessageId",
|
||||
table: "ReactionRole");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ReactionRole_ReactionRoleMessage_ReactionRoleMessageId",
|
||||
table: "ReactionRole",
|
||||
column: "ReactionRoleMessageId",
|
||||
principalTable: "ReactionRoleMessage",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ReactionRole_ReactionRoleMessage_ReactionRoleMessageId",
|
||||
table: "ReactionRole");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ReactionRole_ReactionRoleMessage_ReactionRoleMessageId",
|
||||
table: "ReactionRole",
|
||||
column: "ReactionRoleMessageId",
|
||||
principalTable: "ReactionRoleMessage",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,56 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class boostmessages : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "BoostMessage",
|
||||
table: "GuildConfigs",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "BoostMessageChannelId",
|
||||
table: "GuildConfigs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0ul);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "BoostMessageDeleteAfter",
|
||||
table: "GuildConfigs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "SendBoostMessage",
|
||||
table: "GuildConfigs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BoostMessage",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BoostMessageChannelId",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BoostMessageDeleteAfter",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SendBoostMessage",
|
||||
table: "GuildConfigs");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,69 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class logsettingsindependence : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "GuildId",
|
||||
table: "LogSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0ul);
|
||||
|
||||
migrationBuilder.Sql(
|
||||
@"UPDATE LogSettings SET GuildId = (SELECT GuildId FROM GuildConfigs WHERE LogSettingId = LogSettings.Id);
|
||||
DELETE FROM LogSettings WHERE GuildId = 0;");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_GuildConfigs_LogSettings_LogSettingId",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_GuildConfigs_LogSettingId",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LogSettingId",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_LogSettings_GuildId",
|
||||
table: "LogSettings",
|
||||
column: "GuildId",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_LogSettings_GuildId",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GuildId",
|
||||
table: "LogSettings");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "LogSettingId",
|
||||
table: "GuildConfigs",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_GuildConfigs_LogSettingId",
|
||||
table: "GuildConfigs",
|
||||
column: "LogSettingId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_GuildConfigs_LogSettings_LogSettingId",
|
||||
table: "GuildConfigs",
|
||||
column: "LogSettingId",
|
||||
principalTable: "LogSettings",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,37 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class imageonlychannels : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ImageOnlyChannels",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
ChannelId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ImageOnlyChannels", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ImageOnlyChannels_ChannelId",
|
||||
table: "ImageOnlyChannels",
|
||||
column: "ChannelId",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ImageOnlyChannels");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,97 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class logignoreuserchannel : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql("DELETE FROM IgnoredLogChannels WHERE LogSettingId is NULL");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_IgnoredLogChannels_LogSettings_LogSettingId",
|
||||
table: "IgnoredLogChannels");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_IgnoredLogChannels_LogSettingId",
|
||||
table: "IgnoredLogChannels");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ChannelId",
|
||||
table: "IgnoredLogChannels",
|
||||
newName: "LogItemId");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "LogSettingId",
|
||||
table: "IgnoredLogChannels",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ItemType",
|
||||
table: "IgnoredLogChannels",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_IgnoredLogChannels_LogSettingId_LogItemId_ItemType",
|
||||
table: "IgnoredLogChannels",
|
||||
columns: new[] { "LogSettingId", "LogItemId", "ItemType" },
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IgnoredLogChannels_LogSettings_LogSettingId",
|
||||
table: "IgnoredLogChannels",
|
||||
column: "LogSettingId",
|
||||
principalTable: "LogSettings",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_IgnoredLogChannels_LogSettings_LogSettingId",
|
||||
table: "IgnoredLogChannels");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_IgnoredLogChannels_LogSettingId_LogItemId_ItemType",
|
||||
table: "IgnoredLogChannels");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ItemType",
|
||||
table: "IgnoredLogChannels");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "LogItemId",
|
||||
table: "IgnoredLogChannels",
|
||||
newName: "ChannelId");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "LogSettingId",
|
||||
table: "IgnoredLogChannels",
|
||||
type: "INTEGER",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_IgnoredLogChannels_LogSettingId",
|
||||
table: "IgnoredLogChannels",
|
||||
column: "LogSettingId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IgnoredLogChannels_LogSettings_LogSettingId",
|
||||
table: "IgnoredLogChannels",
|
||||
column: "LogSettingId",
|
||||
principalTable: "LogSettings",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,77 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class nsfwblacklisttags : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "NsfwBlacklistedTags",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
Tag = table.Column<string>(type: "TEXT", nullable: true),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_NsfwBlacklistedTags", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_NsfwBlacklistedTags_GuildId",
|
||||
table: "NsfwBlacklistedTags",
|
||||
column: "GuildId");
|
||||
|
||||
migrationBuilder.Sql("""
|
||||
INSERT INTO NsfwBlacklistedTags(Id, GuildId, Tag, DateAdded)
|
||||
SELECT
|
||||
Id,
|
||||
(SELECT GuildId From GuildConfigs WHERE Id=GuildConfigId),
|
||||
Tag,
|
||||
DateAdded
|
||||
FROM NsfwBlacklitedTag
|
||||
WHERE GuildConfigId in (SELECT Id from GuildConfigs);
|
||||
""");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "NsfwBlacklitedTag");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "NsfwBlacklistedTags");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "NsfwBlacklitedTag",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
GuildConfigId = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
Tag = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_NsfwBlacklitedTag", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_NsfwBlacklitedTag_GuildConfigs_GuildConfigId",
|
||||
column: x => x.GuildConfigId,
|
||||
principalTable: "GuildConfigs",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_NsfwBlacklitedTag_GuildConfigId",
|
||||
table: "NsfwBlacklitedTag",
|
||||
column: "GuildConfigId");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,24 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class weightedwarnings : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Weight",
|
||||
table: "Warnings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 1);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Weight",
|
||||
table: "Warnings");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,70 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class atlrework : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AutoTranslateChannels",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
ChannelId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
AutoDelete = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AutoTranslateChannels", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AutoTranslateUsers",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
ChannelId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
UserId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
Source = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Target = table.Column<string>(type: "TEXT", nullable: true),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AutoTranslateUsers", x => x.Id);
|
||||
table.UniqueConstraint("AK_AutoTranslateUsers_ChannelId_UserId", x => new { x.ChannelId, x.UserId });
|
||||
table.ForeignKey(
|
||||
name: "FK_AutoTranslateUsers_AutoTranslateChannels_ChannelId",
|
||||
column: x => x.ChannelId,
|
||||
principalTable: "AutoTranslateChannels",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AutoTranslateChannels_ChannelId",
|
||||
table: "AutoTranslateChannels",
|
||||
column: "ChannelId",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AutoTranslateChannels_GuildId",
|
||||
table: "AutoTranslateChannels",
|
||||
column: "GuildId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "AutoTranslateUsers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AutoTranslateChannels");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,124 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class crsrenametoexpressionspermrename : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Permissionv2_GuildConfigs_GuildConfigId",
|
||||
table: "Permissionv2");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Permissionv2",
|
||||
table: "Permissionv2");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_CustomReactions",
|
||||
table: "CustomReactions");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Permissionv2",
|
||||
newName: "Permissions");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "CustomReactions",
|
||||
newName: "Expressions");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_Permissionv2_GuildConfigId",
|
||||
table: "Permissions",
|
||||
newName: "IX_Permissions_GuildConfigId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Permissions",
|
||||
table: "Permissions",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Expressions",
|
||||
table: "Expressions",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Permissions_GuildConfigs_GuildConfigId",
|
||||
table: "Permissions",
|
||||
column: "GuildConfigId",
|
||||
principalTable: "GuildConfigs",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.Sql("""
|
||||
UPDATE Permissions
|
||||
SET SecondaryTargetName='ACTUALEXPRESSIONS'
|
||||
WHERE SecondaryTargetName='ActualCustomReactions' COLLATE NOCASE;
|
||||
""");
|
||||
|
||||
migrationBuilder.Sql("""
|
||||
UPDATE Permissions
|
||||
SET SecondaryTargetName='EXPRESSIONS'
|
||||
WHERE SecondaryTargetName='CustomReactions' COLLATE NOCASE;
|
||||
""");
|
||||
|
||||
migrationBuilder.Sql("""
|
||||
UPDATE Permissions
|
||||
SET SecondaryTargetName= case lower(SecondaryTargetName)
|
||||
WHEN 'editcustreact' THEN 'expredit'
|
||||
WHEN 'delcustreact' THEN 'exprdel'
|
||||
WHEN 'listcustreact' THEN 'exprlist'
|
||||
WHEN 'addcustreact' THEN 'expradd'
|
||||
WHEN 'showcustreact' THEN 'exprshow'
|
||||
ELSE SecondaryTargetName
|
||||
END
|
||||
WHERE lower(SecondaryTargetName) in ('editcustreact', 'delcustreact', 'listcustreact', 'addcustreact', 'showcustreact');
|
||||
""");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Permissions_GuildConfigs_GuildConfigId",
|
||||
table: "Permissions");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Permissions",
|
||||
table: "Permissions");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Expressions",
|
||||
table: "Expressions");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Permissions",
|
||||
newName: "Permissionv2");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Expressions",
|
||||
newName: "CustomReactions");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_Permissions_GuildConfigId",
|
||||
table: "Permissionv2",
|
||||
newName: "IX_Permissionv2_GuildConfigId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Permissionv2",
|
||||
table: "Permissionv2",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_CustomReactions",
|
||||
table: "CustomReactions",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Permissionv2_GuildConfigs_GuildConfigId",
|
||||
table: "Permissionv2",
|
||||
column: "GuildConfigId",
|
||||
principalTable: "GuildConfigs",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,83 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class filtersettingscleanup : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_FilterChannelId_GuildConfigs_GuildConfigId1",
|
||||
table: "FilterChannelId");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_FilterChannelId_GuildConfigId1",
|
||||
table: "FilterChannelId");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FilterWordsChannelId",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
ChannelId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
GuildConfigId = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FilterWordsChannelId", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_FilterWordsChannelId_GuildConfigs_GuildConfigId",
|
||||
column: x => x.GuildConfigId,
|
||||
principalTable: "GuildConfigs",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FilterWordsChannelId_GuildConfigId",
|
||||
table: "FilterWordsChannelId",
|
||||
column: "GuildConfigId");
|
||||
|
||||
migrationBuilder.Sql("""
|
||||
INSERT INTO FilterWordsChannelId(Id, ChannelId, GuildConfigId, DateAdded)
|
||||
SELECT Id, ChannelId, GuildConfigId1, DateAdded
|
||||
FROM FilterChannelId
|
||||
WHERE GuildConfigId1 is not null;
|
||||
-- Remove them after moving them to a different table
|
||||
DELETE FROM FilterChannelId
|
||||
WHERE GuildConfigId is null;
|
||||
""");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GuildConfigId1",
|
||||
table: "FilterChannelId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "FilterWordsChannelId");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "GuildConfigId1",
|
||||
table: "FilterChannelId",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FilterChannelId_GuildConfigId1",
|
||||
table: "FilterChannelId",
|
||||
column: "GuildConfigId1");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_FilterChannelId_GuildConfigs_GuildConfigId1",
|
||||
table: "FilterChannelId",
|
||||
column: "GuildConfigId1",
|
||||
principalTable: "GuildConfigs",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,94 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class curtrsreworkdiscorduserdefaults : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Reason",
|
||||
table: "CurrencyTransactions",
|
||||
newName: "Note");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "TotalXp",
|
||||
table: "DiscordUser",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "CurrencyAmount",
|
||||
table: "DiscordUser",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0L,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "INTEGER");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Extra",
|
||||
table: "CurrencyTransactions",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "OtherId",
|
||||
table: "CurrencyTransactions",
|
||||
type: "INTEGER",
|
||||
nullable: true,
|
||||
defaultValueSql: "NULL");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Type",
|
||||
table: "CurrencyTransactions",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Extra",
|
||||
table: "CurrencyTransactions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OtherId",
|
||||
table: "CurrencyTransactions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Type",
|
||||
table: "CurrencyTransactions");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Note",
|
||||
table: "CurrencyTransactions",
|
||||
newName: "Reason");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "TotalXp",
|
||||
table: "DiscordUser",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER",
|
||||
oldDefaultValue: 0);
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "CurrencyAmount",
|
||||
table: "DiscordUser",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "INTEGER",
|
||||
oldDefaultValue: 0L);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,69 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class musicautoplay : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// these 2 settings weren't being used for a long time
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AutoDeleteByeMessages",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AutoDeleteGreetMessages",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "Weight",
|
||||
table: "Warnings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 1L,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER",
|
||||
oldDefaultValue: 1);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "AutoPlay",
|
||||
table: "MusicPlayerSettings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AutoPlay",
|
||||
table: "MusicPlayerSettings");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Weight",
|
||||
table: "Warnings",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 1,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "INTEGER",
|
||||
oldDefaultValue: 1L);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "AutoDeleteByeMessages",
|
||||
table: "GuildConfigs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "AutoDeleteGreetMessages",
|
||||
table: "GuildConfigs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,133 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class clubsrefactor : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql("""
|
||||
UPDATE Clubs
|
||||
SET Name = Name || '#' || Discrim
|
||||
WHERE Discrim <> 1;
|
||||
|
||||
UPDATE Clubs as co
|
||||
SET Name =
|
||||
CASE (select count(*) from Clubs as ci where co.Name == ci.Name) = 1
|
||||
WHEN true
|
||||
THEN Name
|
||||
ELSE
|
||||
Name || '#' || Discrim
|
||||
END
|
||||
WHERE Discrim = 1;
|
||||
""");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Clubs_DiscordUser_OwnerId",
|
||||
table: "Clubs");
|
||||
|
||||
migrationBuilder.DropUniqueConstraint(
|
||||
name: "AK_Clubs_Name_Discrim",
|
||||
table: "Clubs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Discrim",
|
||||
table: "Clubs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MinimumLevelReq",
|
||||
table: "Clubs");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "LastLevelUp",
|
||||
table: "UserXpStats",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValueSql: "datetime('now')",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "TEXT",
|
||||
oldDefaultValue: new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local));
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "OwnerId",
|
||||
table: "Clubs",
|
||||
type: "INTEGER",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER");
|
||||
|
||||
migrationBuilder.AddUniqueConstraint(
|
||||
name: "AK_Clubs_Name",
|
||||
table: "Clubs",
|
||||
column: "Name");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Clubs_DiscordUser_OwnerId",
|
||||
table: "Clubs",
|
||||
column: "OwnerId",
|
||||
principalTable: "DiscordUser",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.SetNull);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Clubs_DiscordUser_OwnerId",
|
||||
table: "Clubs");
|
||||
|
||||
migrationBuilder.DropUniqueConstraint(
|
||||
name: "AK_Clubs_Name",
|
||||
table: "Clubs");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "LastLevelUp",
|
||||
table: "UserXpStats",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local),
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "TEXT",
|
||||
oldDefaultValueSql: "datetime('now')");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "OwnerId",
|
||||
table: "Clubs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Discrim",
|
||||
table: "Clubs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "MinimumLevelReq",
|
||||
table: "Clubs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddUniqueConstraint(
|
||||
name: "AK_Clubs_Name_Discrim",
|
||||
table: "Clubs",
|
||||
columns: new[] { "Name", "Discrim" });
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Clubs_DiscordUser_OwnerId",
|
||||
table: "Clubs",
|
||||
column: "OwnerId",
|
||||
principalTable: "DiscordUser",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user