cli
cli copied to clipboard
The Sequelize CLI
I'm just getting started with Sequelize and the CLI. I want my project's initial database to be bootstrapable with `sequelize db:migrate` (i.e. create the database from nothing with an initial...
## What you are doing? Trying to create a Many to Many associastion between `Team` and `Player` using `belongsToMany`. `create-player` migration: ```js 'use strict'; module.exports = { up: async (queryInterface,...
What are you doing? I call db:migrate and it creates table with plural name, though I've specified freezeTableName: true option. development: { dialect: "sqlite", storage:[hidden on purpose], operatorsAliases: Sequelize.Op, define:...
I would like to access my database via Unix socket. This requires to use a path as hostname, but not all path characters are valid for a hostname. Rust's r2d2...
## What you are doing? ```bash npx sequelize-cli model:generate --name Company --attributes name:string,id:number ``` ## What do you expect to happen? - Either give error because `id` column already getting...
Hi all, I've been using Sequelize and Sequelize CLI for a few weeks now and have come across a bit of an issue. I have a migration that adds columns...
## What you are doing? `$ sequelize db:drop` ## What do you expect to happen? When the database does not exist, I expect the command to exit with status code...
## What you are doing? Trying to consolidate number of config files into package.json ## What do you expect to happen? want .sequelizerc level of support for package.json as well...
I have two migrations scripts. The first one adds a new column to table and with `allowNull: true`: ``` return queryInterface.addColumn( 'likes', 'apartment_id', { type: Sequelize.INTEGER, allowNull: true } );...
## What you are doing? ./node_modules/.bin/sequelize db:seed:all ```js // code here hashPassword.js import bcrypt from 'bcrypt'; let password = ''; const hashPassword = (pass) => { /** * Hash Password...