Answers for "sequelize migration enum"

1

sequelize generate migration

npx sequelize-cli migration:generate --name add-title-post-table
Posted by: Guest on April-09-2021
0

sequelize migration enum

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'),
  },
)),
Posted by: Guest on October-05-2021

Browse Popular Code Answers by Language