using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace EllieBot.Migrations.PostgreSql { public partial class bank : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "bankusers", columns: table => new { id = table.Column(type: "integer", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), userid = table.Column(type: "numeric(20,0)", nullable: false), balance = table.Column(type: "bigint", nullable: false), dateadded = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("pk_bankusers", x => x.id); }); migrationBuilder.CreateIndex( name: "ix_bankusers_userid", table: "bankusers", column: "userid", unique: true); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "bankusers"); } } }