Merge pull request #363 from Tria-plc/freight/feature/vehicle

Freight/feature/vehicle
This commit is contained in:
yaschalew10
2026-06-30 05:26:12 +03:00
committed by GitHub

View File

@@ -15,6 +15,24 @@ export class CreateInvoices1821000000002 implements MigrationInterface {
name = "CreateInvoices1821000000002";
public async up(queryRunner: QueryRunner): Promise<void> {
<<<<<<< HEAD
const typeExists = await queryRunner.query(
`SELECT 1 FROM pg_type WHERE typname = 'invoices_status_enum' AND typnamespace = 'freight'::regnamespace;`,
);
if (!typeExists.length) {
await queryRunner.query(`
CREATE TYPE freight.invoices_status_enum AS ENUM (
'DRAFT',
'PENDING',
'PAID',
'OVERDUE',
'CANCELLED',
'REFUNDED'
);
`);
}
=======
await queryRunner.query(`
CREATE TYPE IF NOT EXISTS freight.invoices_status_enum AS ENUM (
'DRAFT',
@@ -25,6 +43,7 @@ export class CreateInvoices1821000000002 implements MigrationInterface {
'REFUNDED'
);
`);
>>>>>>> 3ceacbe9a9087498cf007111b7b09ad3d35bce35
await queryRunner.query(`
CREATE TABLE freight.invoices (