135 lines
1.4 KiB
JavaScript
135 lines
1.4 KiB
JavaScript
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const db = require('../models');
|
|
const Users = db.users;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Similar logic for "relation_many"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
up: async (queryInterface, Sequelize) => {
|
|
|
|
|
|
|
|
|
|
|
|
await Promise.all([
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Similar logic for "relation_many"
|
|
|
|
|
|
|
|
|
|
|
|
]);
|
|
|
|
},
|
|
|
|
down: async (queryInterface, Sequelize) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
}; |