Skip to content

Commit

Permalink
Remove cascade deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
sanducb committed Aug 27, 2024
1 parent 11720c8 commit b3096c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
exports.up = function (knex) {
return knex.schema.table('grants', function (table) {
table.uuid('tenantId').notNullable()
table
.foreign('tenantId')
.references('id')
.inTable('tenants')
.onDelete('CASCADE')
table.foreign('tenantId').references('id').inTable('tenants')
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,23 @@ exports.up = function (knex) {
return knex.schema
.table('quotes', function (table) {
table.uuid('tenantId').notNullable()
table
.foreign('tenantId')
.references('id')
.inTable('tenants')
.onDelete('CASCADE')
table.foreign('tenantId').references('id').inTable('tenants')
})
.table('incomingPayments', function (table) {
table.uuid('tenantId').notNullable()
table
.foreign('tenantId')
.references('id')
.inTable('tenants')
.onDelete('CASCADE')
table.foreign('tenantId').references('id').inTable('tenants')
})
.table('outgoingPayments', function (table) {
table.uuid('tenantId').notNullable()
table
.foreign('tenantId')
.references('id')
.inTable('tenants')
.onDelete('CASCADE')
table.foreign('tenantId').references('id').inTable('tenants')
})
.table('walletAddresses', function (table) {
table.uuid('tenantId').notNullable()
table
.foreign('tenantId')
.references('id')
.inTable('tenants')
.onDelete('CASCADE')
table.foreign('tenantId').references('id').inTable('tenants')
})
.table('grants', function (table) {
table.uuid('tenantId').notNullable()
table
.foreign('tenantId')
.references('id')
.inTable('tenants')
.onDelete('CASCADE')
table.foreign('tenantId').references('id').inTable('tenants')
})
}

Expand Down

0 comments on commit b3096c4

Please sign in to comment.