mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 22:18:12 +00:00
Merge pull request #982 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
/**
|
||||
* Backoffice contract suspension (reversible freeze at any post-signature step)
|
||||
* and customer-initiated contract cancellation.
|
||||
*
|
||||
* Only one new column is needed: the status to restore when the suspension is
|
||||
* lifted. The reason and the actor already have a home — contract_review_notes
|
||||
* rows with note_type SUSPENSION / SUSPENSION_LIFTED / CANCELLATION.
|
||||
*/
|
||||
export class AddContractSuspension3000000000000 implements MigrationInterface {
|
||||
name = 'AddContractSuspension3000000000000';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE freight.contracts ADD COLUMN IF NOT EXISTS status_before_suspension varchar(40);`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE freight.contracts DROP COLUMN IF EXISTS status_before_suspension;`,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user