import { MigrationInterface, QueryRunner } from "typeorm"

export class AddVehicleType1747034060527 implements MigrationInterface {
  name = "AddVehicleType1747034060527"

  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `CREATE TABLE "vehicle_types" ("id" SERIAL NOT NULL, "name" character varying NOT NULL, "status" smallint NOT NULL DEFAULT 1, "created_at" TIMESTAMP DEFAULT NOW(), "updated_at" TIMESTAMP DEFAULT NOW(), "deleted_at" TIMESTAMP, CONSTRAINT "PK_73d1e40f4add7f4f6947acad3a8" PRIMARY KEY ("id"))`,
    )
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(`DROP TABLE "vehicle_types"`)
  }
}
