Skip to content

Commit

Permalink
add missing indexes on actors fk for convention table
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeBu committed Jul 22, 2024
1 parent 196f183 commit dba8d82
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { MigrationBuilder } from "node-pg-migrate";

export async function up(pgm: MigrationBuilder): Promise<void> {
pgm.createIndex("conventions", "beneficiary_id");
pgm.createIndex("conventions", "establishment_tutor_id");
pgm.createIndex("conventions", "establishment_representative_id");
pgm.createIndex("conventions", "beneficiary_representative_id");
pgm.createIndex("conventions", "beneficiary_current_employer_id");
}

export async function down(pgm: MigrationBuilder): Promise<void> {
pgm.dropIndex("conventions", "beneficiary_id");
pgm.dropIndex("conventions", "establishment_tutor_id");
pgm.dropIndex("conventions", "establishment_representative_id");
pgm.dropIndex("conventions", "beneficiary_representative_id");
pgm.dropIndex("conventions", "beneficiary_current_employer_id");
}

0 comments on commit dba8d82

Please sign in to comment.