change int to ulong discord id

This commit is contained in:
Дмитрий Шиманский
2023-12-19 17:36:46 +03:00
parent 4d086ae1e4
commit 43520544ed
4 changed files with 216 additions and 5 deletions

View File

@@ -0,0 +1,70 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace yaflay.ru.Migrations
{
/// <inheritdoc />
public partial class Migrate191220231734 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "uri",
table: "Redirects",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "redirectTo",
table: "Redirects",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<decimal>(
name: "discordId",
table: "Author",
type: "numeric(20,0)",
nullable: false,
oldClrType: typeof(int),
oldType: "integer");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "uri",
table: "Redirects",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "redirectTo",
table: "Redirects",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "discordId",
table: "Author",
type: "integer",
nullable: false,
oldClrType: typeof(decimal),
oldType: "numeric(20,0)");
}
}
}