Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sequelize sync

/*
 * With ‘force’ option, however, it will alter the table, 
 * which means you can fully sync between model schema you defined 
 * and database.
 */

sequelize.sync({ force: true })

/*
 * Though this is useful during developing the service, 
 * you have to be very careful with ‘force’ option. 
 * Sequelize adds “DROP TABLE” queries additionally as below. 
 * So each time .sync is called, the table is dropped if it already exists.
 */
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #sequelize #sync
ADD COMMENT
Topic
Name
3+9 =