sequelize-cli Questions
3
Solved
I am trying to seed a uuid using sequilize generateUUID
but i get this error Seed file failed with error: sequelize.Utils.generateUUID is not a function TypeError: sequelize.Utils.generateUUID is ...
Alane asked 24/9, 2017 at 9:0
1
Solved
In sequelize, I want to add a condition in findAndCountAll call in sub-sub child models. If the condition is false, it should impact on parent models and findAndCountAll should return array length ...
Ukrainian asked 8/2, 2021 at 11:30
1
Solved
In code from 2016 using sequelize ORM, I see model types defined with this pattern:
module.exports = function(sequelize, DataTypes) {
const Tasks = sequelize.define("Tasks", { id: {
ty...
Anadromous asked 21/7, 2017 at 10:39
4
Solved
I am saving my database config in dotenv file.
I am using sequelize migration which has a config.json file in config folder:
{
"development": {
"username": "root",
"password": null,
"database...
Crustacean asked 21/8, 2017 at 6:44
7
Solved
I've just started using Sequelize and Sequelize CLI
Since it's a development time, there are a frequent addition and deletion of columns. What the best the method to add a new column to an existin...
Refresh asked 22/9, 2017 at 5:37
4
I'm working on a migration using Sequelize. If the migration up method throws an error, the migration is not logged in the database as having completed. So, if I run db:migrate:undo, it instead run...
Hysteresis asked 26/6, 2018 at 17:58
1
Can someone suggest how do I set primary key on two columns within the same table.
var relation = {
'user_id': {
type: DataTypes.INTEGER
},
'organization_id':{
type: DataTypes.INTEGER
}
}
I ...
Pulsar asked 3/12, 2019 at 18:58
1
Solved
If we created 2 new migration scripts and ran
sequelize-cli db:migrate
, both migration scripts will run.
Both migrations are also reverted when we ran once the command
sequelize-cli db:migra...
Unduly asked 8/2, 2020 at 21:16
1
I cannot seem to figure out how to seed ARRAY(ENUM) using Sequelize. When I am registering a user via my app, I can create a new user fine, but when I am using the queryInterface.bulkInsert in a se...
Margaret asked 10/10, 2019 at 15:13
1
Solved
I was creating document_types table using following cli command
sequelize model:create --name User --attributes name:string, username:string, email:string, password:string
Edee asked 19/8, 2019 at 8:58
2
Solved
I am trying to use Sequelize js with Serverless, coming from traditional server background, I am confused where/how to run database migrations.
Should I create a dedicated function for running mig...
Sweyn asked 2/5, 2017 at 12:12
1
I have the below code and I am having a problem. I'm trying to include the images table...
There is a relation between the order and images already, but I don't know why it's showing the error belo...
Musetta asked 9/2, 2019 at 17:43
3
I created a table with timestamps using sequelize. when I am updating the table, it automatically updates the timestamp (i.e createdAt and updatedAt). but these times are different from my local ti...
Zosima asked 27/4, 2018 at 7:49
1
Solved
I'm using sequelize to acess a postgres database and I want to query for a city and for example include the "Building" table but I want to rename the output to "buildings" and return the http respo...
Barrens asked 2/11, 2018 at 11:44
2
Hi i having an issue connecting to Google Cloud SQL from GAE.
My app is running inside docker container here is the docker file
FROM node:8.10.0-alpine
ARG NODE_ENV=production
ENV NODE_ENV=$NOD...
Actomyosin asked 6/7, 2018 at 16:54
1
Solved
Are Sequelize migrations supposed to keep your model files in line with your database?
I used the sequelize cli to bootstrap a simple project and create a model node_modules/.bin/sequelize model:g...
Renie asked 7/3, 2018 at 20:56
1
Solved
Env:
Postgres: 10.2
Node: 6.11.0
CLI: 2.4.0
ORM: 2.1.3
Model:
'use strict';
module.exports = function(sequelize, DataTypes) {
var test = sequelize.define('test', {
id: DataTypes.UUID,
type...
Barnacle asked 19/2, 2018 at 16:10
1
I am trying to delete all report_details before bulkCreate/insert the new ones. The problem is when there is an error in bulkCreate it does not rollback. It should bring the destroyed report_detail...
Keffer asked 29/1, 2018 at 9:20
1
Solved
I am having a problem retrieving data from database using sequelize js. I am new to NODEJS. I don't know if Promise and Promise.all are built in functions
So i install and require npm promise in m...
Bronchia asked 22/1, 2018 at 7:26
1
Solved
I am using sequelize cli with sequelize to generate a seeder file for a many to many join table
Here I have Users and Collections and User_Collections as the join table
I have already created seed...
Hunan asked 18/11, 2017 at 15:15
1
Solved
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 n...
Grata asked 7/7, 2017 at 12:46
1
Solved
I am trying to run a db migration with the Sequelize CLI tool, but I'm running into an issue where my ENV variables are not being processed by the tool. In the github repo, it says in version 2.0.0...
Palaeogene asked 25/11, 2016 at 15:57
1
Solved
I'm creating models and migrations for two types, Player and Team that have many to many relationship. I'm using sequelize model:create, but don't see how to specify foreign keys or join tables.
s...
Hexangular asked 23/9, 2016 at 2:55
1
I'm using sequelize-cli for migrations and have researched different scenarios but there doesn't seem to be a definite solid answer as to how to self join. I want to have a join table called friend...
Quadrisect asked 12/9, 2016 at 17:6
© 2022 - 2024 — McMap. All rights reserved.