mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 07:38:10 +00:00
receipt
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
// import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class AddFanNumberToCompanies1749300000000 implements MigrationInterface {
|
||||
name = 'AddFanNumberToCompanies1749300000000';
|
||||
// export class AddFanNumberToCompanies1749300000000 implements MigrationInterface {
|
||||
// name = 'AddFanNumberToCompanies1749300000000';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.companies
|
||||
ADD COLUMN fan_number varchar(16) NULL;
|
||||
`);
|
||||
}
|
||||
// public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
// await queryRunner.query(`
|
||||
// ALTER TABLE freight.companies
|
||||
// ADD COLUMN fan_number varchar(16) NULL;
|
||||
// `);
|
||||
// }
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.companies
|
||||
DROP COLUMN fan_number;
|
||||
`);
|
||||
}
|
||||
}
|
||||
// public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
// await queryRunner.query(`
|
||||
// ALTER TABLE freight.companies
|
||||
// DROP COLUMN fan_number;
|
||||
// `);
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddReasonToPayment1780662035273 implements MigrationInterface {
|
||||
|
||||
name = "AddReasonToPayment1780662035273";
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.payments
|
||||
ADD COLUMN reason varchar(255)
|
||||
`);
|
||||
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.payments
|
||||
ADD CONSTRAINT UQ_payments_reason UNIQUE (reason)
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.payments
|
||||
DROP CONSTRAINT UQ_payments_reason
|
||||
`);
|
||||
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.payments
|
||||
DROP COLUMN reason
|
||||
`);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user