Deletions now cascade
This commit is contained in:
@@ -4,7 +4,7 @@ exports.up = function (knex) {
|
|||||||
table.increments('id').primary();
|
table.increments('id').primary();
|
||||||
table.timestamp('timestamp').defaultTo(knex.fn.now());
|
table.timestamp('timestamp').defaultTo(knex.fn.now());
|
||||||
table.string('shortcode').index();
|
table.string('shortcode').index();
|
||||||
table.foreign('shortcode').references('shortcode').inTable('urls');
|
table.foreign('shortcode').references('shortcode').inTable('urls').onDelete('CASCADE');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user