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) {
|
2023-02-20 03:43:53 +01:00
|
|
|
await queryInterface.createTable('guestbook', {
|
2023-02-19 10:54:30 +01:00
|
|
|
id: {
|
2023-02-19 15:19:46 +01:00
|
|
|
type: DataTypes.BIGINT(11),
|
2023-02-19 10:54:30 +01:00
|
|
|
primaryKey: true,
|
2023-02-19 15:19:46 +01:00
|
|
|
autoIncrement: true,
|
|
|
|
allowNull: false
|
2023-02-19 10:54:30 +01:00
|
|
|
},
|
|
|
|
name: {
|
2023-02-19 15:19:46 +01:00
|
|
|
type: DataTypes.TEXT,
|
|
|
|
allowNull: false
|
|
|
|
},
|
|
|
|
email: DataTypes.TEXT,
|
|
|
|
text: {
|
|
|
|
type: DataTypes.TEXT,
|
|
|
|
allowNull: false
|
|
|
|
},
|
|
|
|
hidemail: {
|
|
|
|
type: DataTypes.BOOLEAN,
|
|
|
|
allowNull: false
|
|
|
|
},
|
|
|
|
ip: {
|
|
|
|
type: DataTypes.TEXT,
|
|
|
|
allowNull: false
|
|
|
|
},
|
|
|
|
hidden: {
|
|
|
|
type: DataTypes.BOOLEAN,
|
|
|
|
allowNull: false
|
|
|
|
},
|
|
|
|
time: {
|
2023-02-19 16:12:09 +01:00
|
|
|
type: DataTypes.BIGINT,
|
|
|
|
allowNull: false
|
2023-02-19 10:54:30 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
async down(queryInterface, Sequelize) {
|
|
|
|
await queryInterface.dropTable('Guestbooks');
|
|
|
|
}
|
|
|
|
};
|