diff --git a/lib/db/migrations/index.js b/lib/db/migrations/index.js index 7bdd00a..124e4bc 100644 --- a/lib/db/migrations/index.js +++ b/lib/db/migrations/index.js @@ -19,7 +19,7 @@ exports.up = function(knex, Promise) { table.timestamp('added').defaultTo(knex.fn.now()); table.uuid('appId') .references('id') - .inTable('remotedev_apps') + .inTable('remotedev_apps').onDelete('CASCADE').onUpdate('CASCADE') .defaultTo('78626c31-e16b-4528-b8e5-f81301b627f4'); }), knex.schema.createTable('remotedev_payloads', function(table){ @@ -29,7 +29,7 @@ exports.up = function(knex, Promise) { table.timestamp('added').defaultTo(knex.fn.now()); table.uuid('reportId') .references('id') - .inTable('remotedev_reports'); + .inTable('remotedev_reports').onDelete('CASCADE').onUpdate('CASCADE'); }), knex.schema.createTable('remotedev_apps', function(table){ table.uuid('id').primary();