using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace OidcSamples.TrafficPoliceApi.Migrations { public partial class Vehicle : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "vehicles", columns: table => new { id = table.Column(type: "bigint", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), owner_id = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), model = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), color = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), license_plate = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), type = table.Column(type: "integer", nullable: false) }, constraints: table => { table.PrimaryKey("pk_vehicles", x => x.id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "vehicles"); } } }