31 lines
689 B
JavaScript
31 lines
689 B
JavaScript
|
'use strict';
|
||
|
/** @type {import('sequelize-cli').Migration} */
|
||
|
module.exports = {
|
||
|
async up(queryInterface, Sequelize) {
|
||
|
await queryInterface.createTable('Guestbooks', {
|
||
|
id: {
|
||
|
allowNull: false,
|
||
|
autoIncrement: true,
|
||
|
primaryKey: true,
|
||
|
type: Sequelize.INTEGER
|
||
|
},
|
||
|
id: {
|
||
|
type: Sequelize.BIGINT
|
||
|
},
|
||
|
name: {
|
||
|
type: Sequelize.TEXT
|
||
|
},
|
||
|
createdAt: {
|
||
|
allowNull: false,
|
||
|
type: Sequelize.DATE
|
||
|
},
|
||
|
updatedAt: {
|
||
|
allowNull: false,
|
||
|
type: Sequelize.DATE
|
||
|
}
|
||
|
});
|
||
|
},
|
||
|
async down(queryInterface, Sequelize) {
|
||
|
await queryInterface.dropTable('Guestbooks');
|
||
|
}
|
||
|
};
|