mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
Nadeko's output will be cleaner, Reworked migrations
This commit is contained in:
@@ -31,12 +31,12 @@ variables:
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- "dotnet publish -c Release -r linux-x64 --self-contained -o $LINUX_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r linux-arm64 --self-contained -o $LINUX_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r win-x64 --self-contained -o $WIN_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r win-arm64 --self-contained -o $WIN_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r osx-x64 --self-contained -o $MACOS_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r osx-arm64 --self-contained -o $MACOS_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r linux-x64 --self-contained -p:PublishSingleFile=true -o $LINUX_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r linux-arm64 --self-contained -p:PublishSingleFile=true -o $LINUX_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -o $WIN_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r win-arm64 --self-contained -p:PublishSingleFile=true -o $WIN_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r osx-x64 --self-contained -p:PublishSingleFile=true -o $MACOS_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r osx-arm64 --self-contained -p:PublishSingleFile=true -o $MACOS_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
artifacts:
|
||||
paths:
|
||||
- "$LINUX_X64_OUTPUT_DIR/"
|
||||
@@ -109,7 +109,7 @@ test:
|
||||
# script:
|
||||
# - dotnet clean
|
||||
# - dotnet restore -f --no-cache -v n
|
||||
# - dotnet publish -c Release --runtime win7-x64 /p:Version=$CI_COMMIT_TAG src/NadekoBot
|
||||
# - dotnet publish -c Release -p:PublishSingleFile=true --runtime win-x64 /p:Version=$CI_COMMIT_TAG src/NadekoBot
|
||||
# - $env:NADEKOBOT_INSTALL_VERSION = $CI_COMMIT_TAG
|
||||
# - iscc.exe "/O+" ".\exe_builder.iss"
|
||||
# tags:
|
||||
|
@@ -6,6 +6,7 @@ global using Serilog;
|
||||
|
||||
// nadekobot
|
||||
global using NadekoBot;
|
||||
global using NadekoBot.Db;
|
||||
global using NadekoBot.Services;
|
||||
global using Nadeko.Common; // new project
|
||||
global using NadekoBot.Common; // old + nadekobot specific things
|
||||
|
3830
src/NadekoBot/Migrations/Mysql/20240502233216_v5.Designer.cs
generated
Normal file
3830
src/NadekoBot/Migrations/Mysql/20240502233216_v5.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
1615
src/NadekoBot/Migrations/Mysql/20240502233216_v5.cs
Normal file
1615
src/NadekoBot/Migrations/Mysql/20240502233216_v5.cs
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3827
src/NadekoBot/Migrations/PostgreSql/20240502233202_v5.Designer.cs
generated
Normal file
3827
src/NadekoBot/Migrations/PostgreSql/20240502233202_v5.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
327
src/NadekoBot/Migrations/PostgreSql/20240502233202_v5.cs
Normal file
327
src/NadekoBot/Migrations/PostgreSql/20240502233202_v5.cs
Normal file
@@ -0,0 +1,327 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.PostgreSql
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class v5 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "nsfwblacklistedtags");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "pollanswer");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "pollvote");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "poll");
|
||||
|
||||
migrationBuilder.DropUniqueConstraint(
|
||||
name: "ak_clubs_name",
|
||||
table: "clubs");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "command",
|
||||
table: "shopentry",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "type",
|
||||
table: "reminders",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "stickyroles",
|
||||
table: "guildconfigs",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "name",
|
||||
table: "clubs",
|
||||
type: "character varying(20)",
|
||||
maxLength: 20,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(20)",
|
||||
oldMaxLength: 20);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "giveawaymodel",
|
||||
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),
|
||||
messageid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
channelid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
message = table.Column<string>(type: "text", nullable: true),
|
||||
endsat = table.Column<DateTime>(type: "timestamp without time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_giveawaymodel", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "stickyroles",
|
||||
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),
|
||||
roleids = table.Column<string>(type: "text", nullable: true),
|
||||
userid = 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_stickyroles", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "todosarchive",
|
||||
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),
|
||||
name = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_todosarchive", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "giveawayuser",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
giveawayid = table.Column<int>(type: "integer", nullable: false),
|
||||
userid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
name = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_giveawayuser", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_giveawayuser_giveawaymodel_giveawayid",
|
||||
column: x => x.giveawayid,
|
||||
principalTable: "giveawaymodel",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "todos",
|
||||
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),
|
||||
todo = table.Column<string>(type: "text", nullable: true),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
isdone = table.Column<bool>(type: "boolean", nullable: false),
|
||||
archiveid = table.Column<int>(type: "integer", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_todos", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_todos_todosarchive_archiveid",
|
||||
column: x => x.archiveid,
|
||||
principalTable: "todosarchive",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_clubs_name",
|
||||
table: "clubs",
|
||||
column: "name",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_giveawayuser_giveawayid_userid",
|
||||
table: "giveawayuser",
|
||||
columns: new[] { "giveawayid", "userid" },
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_stickyroles_guildid_userid",
|
||||
table: "stickyroles",
|
||||
columns: new[] { "guildid", "userid" },
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_todos_archiveid",
|
||||
table: "todos",
|
||||
column: "archiveid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_todos_userid",
|
||||
table: "todos",
|
||||
column: "userid");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "giveawayuser");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "stickyroles");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "todos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "giveawaymodel");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "todosarchive");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "ix_clubs_name",
|
||||
table: "clubs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "command",
|
||||
table: "shopentry");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "type",
|
||||
table: "reminders");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "stickyroles",
|
||||
table: "guildconfigs");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "name",
|
||||
table: "clubs",
|
||||
type: "character varying(20)",
|
||||
maxLength: 20,
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(20)",
|
||||
oldMaxLength: 20,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddUniqueConstraint(
|
||||
name: "ak_clubs_name",
|
||||
table: "clubs",
|
||||
column: "name");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "nsfwblacklistedtags",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
|
||||
guildid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
tag = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_nsfwblacklistedtags", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "poll",
|
||||
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),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
|
||||
guildid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
question = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_poll", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "pollanswer",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
|
||||
index = table.Column<int>(type: "integer", nullable: false),
|
||||
pollid = table.Column<int>(type: "integer", nullable: true),
|
||||
text = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_pollanswer", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_pollanswer_poll_pollid",
|
||||
column: x => x.pollid,
|
||||
principalTable: "poll",
|
||||
principalColumn: "id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "pollvote",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
|
||||
pollid = table.Column<int>(type: "integer", nullable: true),
|
||||
userid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
voteindex = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_pollvote", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "fk_pollvote_poll_pollid",
|
||||
column: x => x.pollid,
|
||||
principalTable: "poll",
|
||||
principalColumn: "id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_nsfwblacklistedtags_guildid",
|
||||
table: "nsfwblacklistedtags",
|
||||
column: "guildid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_poll_guildid",
|
||||
table: "poll",
|
||||
column: "guildid",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_pollanswer_pollid",
|
||||
table: "pollanswer",
|
||||
column: "pollid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_pollvote_pollid",
|
||||
table: "pollvote",
|
||||
column: "pollid");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
2950
src/NadekoBot/Migrations/Sqlite/20240502233144_v5.Designer.cs
generated
Normal file
2950
src/NadekoBot/Migrations/Sqlite/20240502233144_v5.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
326
src/NadekoBot/Migrations/Sqlite/20240502233144_v5.cs
Normal file
326
src/NadekoBot/Migrations/Sqlite/20240502233144_v5.cs
Normal file
@@ -0,0 +1,326 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class v5 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "NsfwBlacklistedTags");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PollAnswer");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PollVote");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Poll");
|
||||
|
||||
migrationBuilder.DropUniqueConstraint(
|
||||
name: "AK_Clubs_Name",
|
||||
table: "Clubs");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Command",
|
||||
table: "ShopEntry",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Type",
|
||||
table: "Reminders",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "StickyRoles",
|
||||
table: "GuildConfigs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "Clubs",
|
||||
type: "TEXT",
|
||||
maxLength: 20,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldMaxLength: 20);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "GiveawayModel",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
MessageId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
ChannelId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
Message = table.Column<string>(type: "TEXT", nullable: true),
|
||||
EndsAt = table.Column<DateTime>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_GiveawayModel", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "StickyRoles",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
RoleIds = table.Column<string>(type: "TEXT", nullable: true),
|
||||
UserId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_StickyRoles", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TodosArchive",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
UserId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
Name = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TodosArchive", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "GiveawayUser",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GiveawayId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
UserId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
Name = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_GiveawayUser", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_GiveawayUser_GiveawayModel_GiveawayId",
|
||||
column: x => x.GiveawayId,
|
||||
principalTable: "GiveawayModel",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Todos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
UserId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
Todo = table.Column<string>(type: "TEXT", nullable: true),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
IsDone = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
ArchiveId = table.Column<int>(type: "INTEGER", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Todos", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Todos_TodosArchive_ArchiveId",
|
||||
column: x => x.ArchiveId,
|
||||
principalTable: "TodosArchive",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Clubs_Name",
|
||||
table: "Clubs",
|
||||
column: "Name",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_GiveawayUser_GiveawayId_UserId",
|
||||
table: "GiveawayUser",
|
||||
columns: new[] { "GiveawayId", "UserId" },
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_StickyRoles_GuildId_UserId",
|
||||
table: "StickyRoles",
|
||||
columns: new[] { "GuildId", "UserId" },
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Todos_ArchiveId",
|
||||
table: "Todos",
|
||||
column: "ArchiveId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Todos_UserId",
|
||||
table: "Todos",
|
||||
column: "UserId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "GiveawayUser");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "StickyRoles");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Todos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "GiveawayModel");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TodosArchive");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Clubs_Name",
|
||||
table: "Clubs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Command",
|
||||
table: "ShopEntry");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Type",
|
||||
table: "Reminders");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "StickyRoles",
|
||||
table: "GuildConfigs");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "Clubs",
|
||||
type: "TEXT",
|
||||
maxLength: 20,
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldMaxLength: 20,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddUniqueConstraint(
|
||||
name: "AK_Clubs_Name",
|
||||
table: "Clubs",
|
||||
column: "Name");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "NsfwBlacklistedTags",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
Tag = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_NsfwBlacklistedTags", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Poll",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
ChannelId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
Question = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Poll", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PollAnswer",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
Index = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
PollId = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
Text = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PollAnswer", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PollAnswer_Poll_PollId",
|
||||
column: x => x.PollId,
|
||||
principalTable: "Poll",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PollVote",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
PollId = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
UserId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
VoteIndex = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PollVote", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PollVote_Poll_PollId",
|
||||
column: x => x.PollId,
|
||||
principalTable: "Poll",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_NsfwBlacklistedTags_GuildId",
|
||||
table: "NsfwBlacklistedTags",
|
||||
column: "GuildId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Poll_GuildId",
|
||||
table: "Poll",
|
||||
column: "GuildId",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PollAnswer_PollId",
|
||||
table: "PollAnswer",
|
||||
column: "PollId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PollVote_PollId",
|
||||
table: "PollVote",
|
||||
column: "PollId");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -140,6 +140,7 @@ public class PatreonClient : IDisposable
|
||||
LastChargeDate = m.Attributes.LastChargeDate,
|
||||
LastChargeStatus = m.Attributes.LastChargeStatus
|
||||
})
|
||||
.Where(x => x.UserId == 140788173885276160)
|
||||
.ToArray();
|
||||
|
||||
yield return userData;
|
||||
|
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>true</ImplicitUsings>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
<Version>5.0.0</Version>
|
||||
|
||||
<!-- Output/build -->
|
||||
@@ -18,6 +19,7 @@
|
||||
|
||||
<!-- Profile-guided optimization -->
|
||||
<TieredPGO>true</TieredPGO>
|
||||
<DebugType>embedded</DebugType>
|
||||
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -34,7 +36,7 @@
|
||||
<PackageReference Include="Google.Apis.Urlshortener.v1" Version="1.41.1.138"/>
|
||||
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.62.1.3205"/>
|
||||
<PackageReference Include="Google.Apis.Customsearch.v1" Version="1.49.0.2084"/>
|
||||
<PackageReference Include="Grpc.AspNetCore" Version="2.62.0" />
|
||||
<!-- <PackageReference Include="Grpc.AspNetCore" Version="2.62.0" />-->
|
||||
<PackageReference Include="Google.Protobuf" Version="3.26.1"/>
|
||||
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.62.0"/>
|
||||
<PackageReference Include="Grpc.Tools" Version="2.62.0">
|
||||
@@ -117,12 +119,15 @@
|
||||
<Link>Protos\coordinator.proto</Link>
|
||||
</Protobuf>
|
||||
<None Update="data\**\*">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="nadeko_icon.ico">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<None Update="creds.yml">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="creds.yml;creds_example.yml">
|
||||
<None Update="creds_example.yml">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
Reference in New Issue
Block a user