Skip to content

Commit

Permalink
fix: migration typos
Browse files Browse the repository at this point in the history
  • Loading branch information
njlie committed Oct 19, 2023
1 parent 4ad3cdb commit 5113efd
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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')
}),
Expand Down

0 comments on commit 5113efd

Please sign in to comment.