Skip to content

Commit

Permalink
use on delete no action
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyi-gao-ttd committed Oct 24, 2023
1 parent d64b166 commit 25c3ee9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { Knex } from 'knex';
export async function up(knex: Knex): Promise<void> {
await knex.schema.alterTable('participantsToTypes', (table) => {
table.dropForeign('participantTypeId');
table.foreign('participantTypeId').references('participantTypes.id');
table.foreign('participantTypeId').references('participantTypes.id').onDelete('NO ACTION');
});

await knex.schema.alterTable('approvers', (table) => {
table.dropForeign('participantTypeId');
table.foreign('participantTypeId').references('participantTypes.id');
table.foreign('participantTypeId').references('participantTypes.id').onDelete('NO ACTION');
});
}

Expand Down

0 comments on commit 25c3ee9

Please sign in to comment.