File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,10 @@ module.exports = class SchemaMigrationService extends Service {
1313 * @param model model object
1414 */
1515 dropModel ( model ) {
16- const dialect = connection . dialect . connectionManager . dialectName
17- return model . sequelize . query ( dialect === 'sqlite' ? 'PRAGMA foreign_keys = OFF' : 'SET FOREIGN_KEY_CHECKS = 0' ) . then ( ( ) => {
16+ return model . sequelize . query ( 'SET FOREIGN_KEY_CHECKS = 0' ) . then ( ( ) => {
1817 return model . sync ( { force : true } )
1918 } ) . then ( ( ) => {
20- return model . sequelize . query ( dialect === 'sqlite' ? 'PRAGMA foreign_keys = ON' : 'SET FOREIGN_KEY_CHECKS = 1' )
19+ return model . sequelize . query ( 'SET FOREIGN_KEY_CHECKS = 1' )
2120 } ) . catch ( err => {
2221 return model . sync ( { force : true } )
2322 } )
You can’t perform that action at this time.
0 commit comments