mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Killed history
This commit is contained in:
27
NadekoBot.Core/Migrations/20210615015139_aar-many.cs
Normal file
27
NadekoBot.Core/Migrations/20210615015139_aar-many.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace NadekoBot.Migrations
|
||||
{
|
||||
public partial class aarmany : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AutoAssignRoleIds",
|
||||
table: "GuildConfigs",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.Sql(@"UPDATE GuildConfigs
|
||||
SET AutoAssignRoleIds=CAST(AutoAssignRoleId AS TEXT),
|
||||
AutoAssignRoleId = 0
|
||||
WHERE AutoAssignRoleId is not null and AutoAssignRoleId <> 0;");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AutoAssignRoleIds",
|
||||
table: "GuildConfigs");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user