Files
PL_JusticeBot/Migrations/20231029182451_InitMigrate292124.cs
Дмитрий Шиманский e977fb2abd pisua
2023-11-02 16:48:36 +03:00

49 lines
1.5 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DiscordApp.Migrations
{
/// <inheritdoc />
public partial class InitMigrate292124 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameTable(
name: "Bizness",
newName: "Bizness",
newSchema: "public");
migrationBuilder.CreateTable(
name: "Reports",
schema: "public",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Employee = table.Column<string>(type: "text", nullable: false),
type = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Reports", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Reports",
schema: "public");
migrationBuilder.RenameTable(
name: "Bizness",
schema: "public",
newName: "Bizness");
}
}
}