sequelize / cli

The Sequelize CLI
MIT License
2.52k stars 528 forks source link

fix: add support for the paranoid flag #1512

Open SteGun93 opened 2 weeks ago

SteGun93 commented 2 weeks ago

Pull Request check-list

Please make sure to review and check all of these items:

Description of change

The following files have been changed:

model_generate.js yargs.js model.js model-helper.js migration-helper.js create-table.js create.test.js

solved issue:

https://github.com/sequelize/cli/issues/1139

The following test has been adapted:

model/create.test.js

update to the documentation:

In order to be able to assign the paranoid flag via the CLI, it is possible to set the flag --paranoid true after the model:generate

You can also set the paranoid flag to true in the .sequelizerc , so all created models and migrations will be paranoid by default.

If you have set paranoid to true in the config, you can set paranoid to false for individual tables by setting the flag to --paranoid false via the CLI after the model:generate