Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add another column without delete table sequelize

const queryInterface = sequelize.getQueryInterface();

  queryInterface.addColumn('users', 'isBlock', {
    type: DataTypes.STRING(),
    defaultValue: "no",
    comment: "yes || no"
  }).catch(error => console.log(error));
 
PREVIOUS NEXT
Tagged: #add #column #delete #table #sequelize
ADD COMMENT
Topic
Name
9+7 =