Skip to content

Commit

Permalink
LF-4703 Delete deleted entries on rollback to meet previous PK unique…
Browse files Browse the repository at this point in the history
…ness
  • Loading branch information
Duncan-Brain committed Feb 11, 2025
1 parent eec4760 commit 73712d1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

export const up = async function (knex) {
await knex.schema.alterTable('farm_addon', (t) => {
// Knex apparently does not rename indexes aliong with table names
// Knex apparently does not rename indexes along with table names
t.dropPrimary('farm_external_integration_pkey');
});
await knex.schema.alterTable('farm_addon', (t) => {
Expand Down Expand Up @@ -48,6 +48,7 @@ export const up = async function (knex) {
};

export const down = async function (knex) {
await knex('farm_addon').where({ deleted: true }).del();
await knex.schema.alterTable('farm_addon', (t) => {
t.dropIndex(['farm_id', 'addon_partner_id'], 'farm_addon_uniqueness_composite');
t.dropPrimary();
Expand Down

0 comments on commit 73712d1

Please # to comment.