diff --git a/packages/auth/migrations/20240827131417_update_grants_with_tenantId.js b/packages/auth/migrations/20240827131417_update_grants_with_tenantId.js index 758d187419..98ca85fbe7 100644 --- a/packages/auth/migrations/20240827131417_update_grants_with_tenantId.js +++ b/packages/auth/migrations/20240827131417_update_grants_with_tenantId.js @@ -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') }) } diff --git a/packages/backend/migrations/20240827115832_update_resources_with_tenantId.js b/packages/backend/migrations/20240827115832_update_resources_with_tenantId.js index aa1adde645..6d9f201a57 100644 --- a/packages/backend/migrations/20240827115832_update_resources_with_tenantId.js +++ b/packages/backend/migrations/20240827115832_update_resources_with_tenantId.js @@ -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') }) }