UNPKG

@coko/server

Version:

Reusable server for use by Coko's projects

23 lines 725 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.down = exports.up = void 0; const up = async (db) => { await db.schema.alterTable('identities', table => { table.dropForeign(['user_id']); table .foreign('user_id') .references('id') .inTable('users') .onDelete('CASCADE') .onUpdate('CASCADE'); }); }; exports.up = up; const down = async (db) => { await db.schema.alterTable('identities', table => { table.dropForeign(['user_id']); table.foreign('user_id').references('id').inTable('users'); }); }; exports.down = down; //# sourceMappingURL=1722409523-identity-user-id-cascade.js.map