mirror of
https://github.com/yawaflua/PL_JusticeBot.git
synced 2025-12-10 04:19:31 +02:00
добавил переделывание паспортов
This commit is contained in:
93
Migrations/20231026134430_InternalMigration.Designer.cs
generated
Normal file
93
Migrations/20231026134430_InternalMigration.Designer.cs
generated
Normal file
@@ -0,0 +1,93 @@
|
||||
// <auto-generated />
|
||||
using DiscordApp.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DiscordApp.Migrations
|
||||
{
|
||||
[DbContext(typeof(AppDbContext))]
|
||||
[Migration("20231026134430_InternalMigration")]
|
||||
partial class InternalMigration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.13")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("DiscordApp.Database.Tables.Autobranches", b =>
|
||||
{
|
||||
b.Property<decimal>("ChannelId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("numeric(20,0)");
|
||||
|
||||
b.Property<string>("BranchName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("ChannelId");
|
||||
|
||||
b.ToTable("Autobranches", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DiscordApp.Database.Tables.Autoreactions", b =>
|
||||
{
|
||||
b.Property<decimal>("ChannelId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("numeric(20,0)");
|
||||
|
||||
b.Property<string>("EmoteId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("ChannelId");
|
||||
|
||||
b.ToTable("Autoreactions", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DiscordApp.Database.Tables.Passport", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Applicant")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<long>("Date")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<decimal>("Employee")
|
||||
.HasColumnType("numeric(20,0)");
|
||||
|
||||
b.Property<string>("Gender")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("RpName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Support")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Passport", "public");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
79
Migrations/20231026134430_InternalMigration.cs
Normal file
79
Migrations/20231026134430_InternalMigration.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DiscordApp.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class InternalMigration : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.EnsureSchema(
|
||||
name: "public");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Autobranches",
|
||||
schema: "public",
|
||||
columns: table => new
|
||||
{
|
||||
ChannelId = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
BranchName = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Autobranches", x => x.ChannelId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Autoreactions",
|
||||
schema: "public",
|
||||
columns: table => new
|
||||
{
|
||||
ChannelId = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
EmoteId = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Autoreactions", x => x.ChannelId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Passport",
|
||||
schema: "public",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Employee = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
Applicant = table.Column<string>(type: "text", nullable: false),
|
||||
Date = table.Column<long>(type: "bigint", nullable: false),
|
||||
Support = table.Column<int>(type: "integer", nullable: false),
|
||||
Gender = table.Column<string>(type: "text", nullable: false),
|
||||
RpName = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Passport", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Autobranches",
|
||||
schema: "public");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Autoreactions",
|
||||
schema: "public");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Passport",
|
||||
schema: "public");
|
||||
}
|
||||
}
|
||||
}
|
||||
81
Migrations/20231026161439_AddBitrhDate.Designer.cs
generated
Normal file
81
Migrations/20231026161439_AddBitrhDate.Designer.cs
generated
Normal file
@@ -0,0 +1,81 @@
|
||||
// <auto-generated />
|
||||
using DiscordApp.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DiscordApp.Migrations
|
||||
{
|
||||
[DbContext(typeof(AppDbContext))]
|
||||
[Migration("20231026161439_AddBitrhDate")]
|
||||
partial class AddBitrhDate
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.13")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("DiscordApp.Database.Tables.Autobranches", b =>
|
||||
{
|
||||
b.Property<decimal>("ChannelId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("numeric(20,0)");
|
||||
|
||||
b.Property<string>("BranchName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("ChannelId");
|
||||
|
||||
b.ToTable("Autobranches", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DiscordApp.Database.Tables.Passport", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Applicant")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<long>("Date")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<decimal>("Employee")
|
||||
.HasColumnType("numeric(20,0)");
|
||||
|
||||
b.Property<string>("Gender")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("RpName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Support")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<long>("birthDate")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Passport", "public");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Migrations/20231026161439_AddBitrhDate.cs
Normal file
48
Migrations/20231026161439_AddBitrhDate.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DiscordApp.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddBitrhDate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Autoreactions",
|
||||
schema: "public");
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "birthDate",
|
||||
schema: "public",
|
||||
table: "Passport",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "birthDate",
|
||||
schema: "public",
|
||||
table: "Passport");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Autoreactions",
|
||||
schema: "public",
|
||||
columns: table => new
|
||||
{
|
||||
ChannelId = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
EmoteId = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Autoreactions", x => x.ChannelId);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
78
Migrations/AppDbContextModelSnapshot.cs
Normal file
78
Migrations/AppDbContextModelSnapshot.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
// <auto-generated />
|
||||
using DiscordApp.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DiscordApp.Migrations
|
||||
{
|
||||
[DbContext(typeof(AppDbContext))]
|
||||
partial class AppDbContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.13")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("DiscordApp.Database.Tables.Autobranches", b =>
|
||||
{
|
||||
b.Property<decimal>("ChannelId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("numeric(20,0)");
|
||||
|
||||
b.Property<string>("BranchName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("ChannelId");
|
||||
|
||||
b.ToTable("Autobranches", "public");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DiscordApp.Database.Tables.Passport", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Applicant")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<long>("Date")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<decimal>("Employee")
|
||||
.HasColumnType("numeric(20,0)");
|
||||
|
||||
b.Property<string>("Gender")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("RpName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Support")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<long>("birthDate")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Passport", "public");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user