1queryInterface.createTable(
2 'Posts',
3 {
4 title: {
5 type: Sequelize.DataTypes.STRING(100),
6 allowNull: false
7 }
8 }
9);
1queryInterface.changeColumn(
2 'table_name',
3 'Column_name',
4 {
5 type: Sequelize.TEXT,
6 },
7),
8queryInterface.sequelize.query('drop type enum_tableName_columnName;')
9.then(() => queryInterface.changeColumn(
10 'table_name',
11 'column_name',
12 {
13 type: Sequelize.ENUM('value1','value2'),
14 },
15)),
16
1app.get('/fruit/:fruitName', function(req, res) {
2 console.log(req.params.fruitName);
3});