mirror of
https://github.com/yawaflua/PL_JusticeBot.git
synced 2025-12-10 04:19:31 +02:00
add notary module, utilities and server online in bot`s game
This commit is contained in:
56
Migrations/20231111140218_Migrate11111701.cs
Normal file
56
Migrations/20231111140218_Migrate11111701.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DiscordApp.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Migrate11111701 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Certificate",
|
||||
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),
|
||||
passportId = table.Column<int>(type: "integer", nullable: false),
|
||||
Date = table.Column<DateOnly>(type: "date", nullable: false),
|
||||
Text = table.Column<string>(type: "text", nullable: false),
|
||||
DocumentId = table.Column<int>(type: "integer", nullable: false),
|
||||
DocumentType = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Certificate", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Certificate_Passport_passportId",
|
||||
column: x => x.passportId,
|
||||
principalSchema: "public",
|
||||
principalTable: "Passport",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Certificate_passportId",
|
||||
schema: "public",
|
||||
table: "Certificate",
|
||||
column: "passportId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Certificate",
|
||||
schema: "public");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user