i am using gulp tasks for migration of database. For testing purpose i am using different database. so i need exactly same database. i am trying to do with sequelize.sync({ force: true }) but its not working.
i am having my all models in portal-model. here is the code:
const models = require('portal-models');
gulp.task('migrate', ['create-database'], (done) => {
models.sequelize.query('SET FOREIGN_KEY_CHECKS = 0')
.then(() => models.sequelize.sync({ force: true, alter: true }))
....
....
....
)
With Force: true it should work but for me i am getting error like mydatbaseName.tablename is not exists.
i have created new test database. i dont want to manually create everything in testdatabase, so i am using migrations but i gusse sync is not working properly.
Can anyone tell, exactly what should i follow?
Thanks in Advance.