From 5113efd6f5bfc1d716ce2b5f376deff03f4d19c8 Mon Sep 17 00:00:00 2001 From: Nathan Lie Date: Thu, 19 Oct 2023 14:20:21 -0700 Subject: [PATCH] fix: migration typos --- .../20230918113102_rename_payment_pointer_tables.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/backend/migrations/20230918113102_rename_payment_pointer_tables.js b/packages/backend/migrations/20230918113102_rename_payment_pointer_tables.js index d0b1516f73..2a305dbd05 100644 --- a/packages/backend/migrations/20230918113102_rename_payment_pointer_tables.js +++ b/packages/backend/migrations/20230918113102_rename_payment_pointer_tables.js @@ -40,27 +40,21 @@ exports.up = function (knex) { table.dropIndex(['paymentPointerId', 'createdAt', 'id']) table.renameColumn('paymentPointerId', 'walletAddressId') table.foreign('walletAddressId').references('walletAddresses.id') - table.index(['walletAddressId']) - table.index(['createdAt']) - table.index(['id']) + table.index(['walletAddressId', 'createdAt', 'id']) }), knex.schema.alterTable('incomingPayments', function (table) { table.dropForeign(['paymentPointerId']) table.dropIndex(['paymentPointerId', 'createdAt', 'id']) table.renameColumn('paymentPointerId', 'walletAddressId') table.foreign('walletAddressId').references('walletAddresses.id') - table.index(['walletAddressId']) - table.index(['createdAt']) - table.index(['id']) + table.index(['walletAddressId', 'createdAt', 'id']) }), knex.schema.alterTable('outgoingPayments', function (table) { table.dropForeign(['paymentPointerId']) table.dropIndex(['paymentPointerId', 'createdAt', 'id']) table.renameColumn('paymentPointerId', 'walletAddressId') table.foreign('walletAddressId').references('walletAddresses.id') - table.index(['walletAddressId']) - table.index(['createdAt']) - table.index(['id']) + table.index(['walletAddressId', 'createdAt', 'id']) }), knex('webhookEvents') .update({ @@ -126,7 +120,6 @@ exports.down = function (knex) { ), knex.schema.renameTable('walletAddressKeys', 'paymentPointerKeys'), knex.schema.alterTable('paymentPointerKeys', function (table) { - table.dropForeign(['walletAddressId']) table.renameColumn('walletAddressId', 'paymentPointerId') table.foreign('paymentPointerId').references('paymentPointers.id') }),