Merge pull request #44 from akaztp/fix-db-cascade

fix database seeding second run.
This commit is contained in:
Mihail Diordiev 2017-07-25 22:06:51 +03:00 committed by GitHub
commit d3d98daf7d

View File

@ -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();