UNPKG

nsfw-api

Version:
43 lines (36 loc) 867 B
'use strict'; module.exports = { up: (queryInterface, Sequelize) => { /* Add altering commands here. Return a promise to correctly handle asynchronicity. Example: return queryInterface.createTable('users', { id: Sequelize.INTEGER }); */ return queryInterface.addColumn( 'Logins', 'UserId', { type:Sequelize.INTEGER, references: { model: "Users", key: "id", }, onUpdate: "CASCADE", onDelete: "CASCADE", } ); }, down: (queryInterface, Sequelize) => { /* Add reverting commands here. Return a promise to correctly handle asynchronicity. Example: return queryInterface.dropTable('users'); */ return queryInterface.removeColumn( "Logins", "UserId" ); } };