Skip to content

Commit

Permalink
fix: error on running beneficiaries migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Birloi Florian authored and Birloi Florian committed May 24, 2024
1 parent bf881fc commit f45b55a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ export class UpdatePracticesAndServices1716541753299
name = 'UpdatePracticesAndServices1716541753299';

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`UPDATE "civic_center_service" set "age_categories" = '{}'`,
);
await queryRunner.query(
`ALTER TYPE "public"."civic_center_service_age_categories_enum" RENAME TO "civic_center_service_age_categories_enum_old"`,
);
Expand All @@ -23,6 +26,9 @@ export class UpdatePracticesAndServices1716541753299
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`UPDATE "civic_center_service" set "age_categories" = '{}'`,
);
await queryRunner.query(
`CREATE TYPE "public"."civic_center_service_age_categories_enum_old" AS ENUM('0-18', '18-25', '25-35', '35-60', '60+')`,
);
Expand Down

0 comments on commit f45b55a

Please sign in to comment.