mirror of
https://github.com/ditkrg/AuthorizationServerDemos.git
synced 2026-01-23 07:27:03 +00:00
35 lines
1.5 KiB
C#
35 lines
1.5 KiB
C#
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<long>(type: "bigint", nullable: false)
|
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
owner_id = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
|
|
model = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
|
|
color = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: true),
|
|
license_plate = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: true),
|
|
type = table.Column<int>(type: "integer", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("pk_vehicles", x => x.id);
|
|
});
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "vehicles");
|
|
}
|
|
}
|
|
}
|