homepage.js/migrations/20230219070939-create-guest...

13 lines
409 B
JavaScript
Raw Normal View History

2023-02-19 10:54:30 +01:00
'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
2023-02-19 15:19:46 +01:00
async up(queryInterface, DataTypes) {
const struct = require('../models').Guestbook.structure;
await queryInterface.createTable('guestbook', struct);
2023-02-19 10:54:30 +01:00
},
async down(queryInterface, Sequelize) {
2023-02-22 14:55:17 +01:00
if (await queryInterface.tableExists('guestbook')) {
await queryInterface.dropTable('guestbook');
}
2023-02-19 10:54:30 +01:00
}
};