cli
cli copied to clipboard
The Sequelize CLI
Consider this command: ``` bash sequelize model:create --name User --attributes username:string ``` Running it will create a model with a `username` property and type attribute: ``` javascript var User =...
## What you are doing? I am having an issue with my config file I have it set up to make use of environment variables It looks like this ```...
When `sequelize-cli init` is run, it creates directories _models, midgrations, seeders_ . Under models it creates a `index.js` file, which based on configurations establishes database connection and also binds the...
## What you are doing? I have migrations written in typescript. These compiled worked fine until CLI of version `6.1.0`. They don't after updating to version `6.4.1`. ```bash npx sequelize...
## What you are doing? I used orm scaffolding sequelize-cli to build the model, my project timezone is incorrect always 8 hours less than the actual time, by setting timezone:...
We currently search for [`config/config.json` and `config/config.js`](https://github.com/sequelize/cli/blob/main/src/helpers/config-helper.js#L50) We should also automatically look for extensions .cjs, and .mjs so [specifying the config file location](https://github.com/sequelize/sequelize/pull/13669/files#diff-ea0fa26254005a5d23a54ad3b37602ae00bb71f136290dcf860fe4655492b5a0R74) is not necessary. --- We should do...
## What you are doing? Attempting to use a pre-existing schema/migrations file with a user does not have `CREATE` permission on the database. ```javascript // .sequelizerc const path = require('path')...
## What you are doing? Since PostgreSQL enforces that only the owner of the table is allowed to do `CREATE TABLE`, `ALTER TABLE` and `DROP TABLE`, I need to switch...
## What you are doing? Attempting to add the timestamp fields to migration table in custom schema. ```javascript // .sequelizerc const path = require('path') module.exports = { config: path.resolve('./database/config', 'config.js'),...
Added ability to specify custom filename during model generation. Developers can therefore ensure consistency for their naming conventions. ### Pull Request check-list _Please make sure to review and check all...