From 9c39052ef0088f48d40c9306e8cc85feabfc261a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Proen=C3=A7a?= Date: Mon, 24 Jul 2017 09:41:26 +0100 Subject: [PATCH] fix database seeding second run. missing onDelete('cascade') --- lib/db/migrations/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();