Files
toho-miku/migrations/20220818130258-make-card-userid-nullable.js
2022-08-19 14:41:48 +02:00

19 lines
397 B
JavaScript

'use strict';
module.exports = {
async up (queryInterface, Sequelize) {
await queryInterface.changeColumn('Cards', 'userId', {
type: Sequelize.INTEGER,
allowNull: true,
defaultValue: null
});
},
async down (queryInterface, Sequelize) {
await queryInterface.changeColumn('Cards', 'userId', {
type: Sequelize.INTEGER,
defaultValue: 0
});
}
};