mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 21:48:18 +00:00
feat: add toggle to DJF
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
/**
|
||||
* Adds the currency-level DJF switch to `manual_payment_settings`.
|
||||
*
|
||||
* Distinct from `djf_enabled`, which governs only the MANUAL rail: this one
|
||||
* says whether DJF may be used as a payment currency at all — offered on the
|
||||
* booking forms and accepted for online payment. Defaults to `true`, the
|
||||
* behaviour before the switch existed.
|
||||
*/
|
||||
export class AddDjfPaymentsEnabled3890000000000 implements MigrationInterface {
|
||||
name = 'AddDjfPaymentsEnabled3890000000000';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.manual_payment_settings
|
||||
ADD COLUMN IF NOT EXISTS djf_payments_enabled boolean NOT NULL DEFAULT true;
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.manual_payment_settings DROP COLUMN IF EXISTS djf_payments_enabled;
|
||||
`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user