|
| 1 | +import { MigrationInterface, QueryRunner } from "typeorm"; |
| 2 | + |
| 3 | +export class EndDateConditionTypes1733872207951 implements MigrationInterface { |
| 4 | + |
| 5 | + public async up(queryRunner: QueryRunner): Promise<void> { |
| 6 | + await queryRunner.query(` |
| 7 | + INSERT INTO alcs.application_decision_condition_type ( |
| 8 | + "audit_created_at", |
| 9 | + "audit_updated_at", |
| 10 | + "audit_created_by", |
| 11 | + "audit_updated_by", |
| 12 | + "label", |
| 13 | + "code", |
| 14 | + "description", |
| 15 | + "is_component_to_condition_checked", |
| 16 | + "is_description_checked", |
| 17 | + "is_administrative_fee_amount_checked", |
| 18 | + "is_administrative_fee_amount_required", |
| 19 | + "administrative_fee_amount", |
| 20 | + "single_date_label", |
| 21 | + "is_security_amount_checked", |
| 22 | + "is_security_amount_required", |
| 23 | + "is_active", |
| 24 | + "is_date_checked", |
| 25 | + "is_date_required", |
| 26 | + "date_type" |
| 27 | + ) VALUES ( |
| 28 | + now(), |
| 29 | + now(), |
| 30 | + 'migration_seed', |
| 31 | + 'migration_seed', |
| 32 | + 'Use End Date', |
| 33 | + 'UEND', |
| 34 | + 'The final date that the use is approved to. After this date, the approval expires.', |
| 35 | + true, |
| 36 | + true, |
| 37 | + false, |
| 38 | + null, |
| 39 | + null, |
| 40 | + 'End Date', |
| 41 | + false, |
| 42 | + null, |
| 43 | + true, |
| 44 | + true, |
| 45 | + false, |
| 46 | + 'Single' |
| 47 | + ) |
| 48 | + ON CONFLICT (code) DO UPDATE |
| 49 | + SET |
| 50 | + "audit_created_at" = now(), |
| 51 | + "audit_updated_at" = now(), |
| 52 | + "audit_created_by" = 'migration_seed', |
| 53 | + "audit_updated_by" = 'migration_seed', |
| 54 | + "label" = 'Use End Date', |
| 55 | + "description" = 'The final date that the use is approved to. After this date, the approval expires.', |
| 56 | + "is_component_to_condition_checked" = true, |
| 57 | + "is_description_checked" = true, |
| 58 | + "is_administrative_fee_amount_checked" = false, |
| 59 | + "is_administrative_fee_amount_required" = null, |
| 60 | + "administrative_fee_amount" = null, |
| 61 | + "single_date_label" = 'End Date', |
| 62 | + "is_security_amount_checked" = false, |
| 63 | + "is_security_amount_required" = null, |
| 64 | + "is_active" = true, |
| 65 | + "is_date_checked" = true, |
| 66 | + "is_date_required" = false, |
| 67 | + "date_type" = 'Single'; |
| 68 | + `); |
| 69 | + await queryRunner.query(` |
| 70 | + INSERT INTO alcs.notice_of_intent_decision_condition_type ( |
| 71 | + "audit_created_at", |
| 72 | + "audit_updated_at", |
| 73 | + "audit_created_by", |
| 74 | + "audit_updated_by", |
| 75 | + "label", |
| 76 | + "code", |
| 77 | + "description", |
| 78 | + "is_component_to_condition_checked", |
| 79 | + "is_description_checked", |
| 80 | + "is_administrative_fee_amount_checked", |
| 81 | + "is_administrative_fee_amount_required", |
| 82 | + "administrative_fee_amount", |
| 83 | + "single_date_label", |
| 84 | + "is_security_amount_checked", |
| 85 | + "is_security_amount_required", |
| 86 | + "is_active", |
| 87 | + "is_date_checked", |
| 88 | + "is_date_required", |
| 89 | + "date_type" |
| 90 | + ) VALUES ( |
| 91 | + now(), |
| 92 | + now(), |
| 93 | + 'migration_seed', |
| 94 | + 'migration_seed', |
| 95 | + 'Use End Date', |
| 96 | + 'UEND', |
| 97 | + 'The final date that the use is approved to. After this date, the approval expires.', |
| 98 | + true, |
| 99 | + true, |
| 100 | + false, |
| 101 | + null, |
| 102 | + null, |
| 103 | + 'End Date', |
| 104 | + false, |
| 105 | + null, |
| 106 | + true, |
| 107 | + true, |
| 108 | + false, |
| 109 | + 'Single' |
| 110 | + ) |
| 111 | + ON CONFLICT (code) DO UPDATE |
| 112 | + SET |
| 113 | + "audit_created_at" = now(), |
| 114 | + "audit_updated_at" = now(), |
| 115 | + "audit_created_by" = 'migration_seed', |
| 116 | + "audit_updated_by" = 'migration_seed', |
| 117 | + "label" = 'Use End Date', |
| 118 | + "description" = 'The final date that the use is approved to. After this date, the approval expires.', |
| 119 | + "is_component_to_condition_checked" = true, |
| 120 | + "is_description_checked" = true, |
| 121 | + "is_administrative_fee_amount_checked" = false, |
| 122 | + "is_administrative_fee_amount_required" = null, |
| 123 | + "administrative_fee_amount" = null, |
| 124 | + "single_date_label" = 'End Date', |
| 125 | + "is_security_amount_checked" = false, |
| 126 | + "is_security_amount_required" = null, |
| 127 | + "is_active" = true, |
| 128 | + "is_date_checked" = true, |
| 129 | + "is_date_required" = false, |
| 130 | + "date_type" = 'Single'; |
| 131 | + `); |
| 132 | + } |
| 133 | + |
| 134 | + public async down(queryRunner: QueryRunner): Promise<void> { |
| 135 | + // N/A |
| 136 | + } |
| 137 | + |
| 138 | +} |
0 commit comments