Seenize generuj migrację
npx sequelize-cli migration:generate --name add-title-post-table
Obedient Oyster
npx sequelize-cli migration:generate --name add-title-post-table
npx sequelize-cli migration:generate --name migration-skeleton
queryInterface.changeColumn(
'table_name',
'Column_name',
{
type: Sequelize.TEXT,
},
),
queryInterface.sequelize.query('drop type enum_tableName_columnName;')
.then(() => queryInterface.changeColumn(
'table_name',
'column_name',
{
type: Sequelize.ENUM('value1','value2'),
},
)),