Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
2 answers
56 views

I'm trying to integrate sequelize with the db conection to postgres and i am getting an error where relationships are built. i don't know if i'm missing something at this point index.js 'use strict'; ...
o.go's user avatar
  • 1
1 vote
0 answers
31 views

My sequelize-cli is npx sequelize-cli model:generate --name Profile --attributes username:string,imageUrl:string,fullname:string,dateOfBirth:date,UserId:UUID,role:enum:'{staff,admin}':defaultValue:...
flyingduck92's user avatar
  • 1,692
0 votes
1 answer
74 views

I'm using type module/import syntax for the rest of my project, but the Sequelize CLI generates files with require syntax. How should I handle this? I'm already having trouble with not being able to ...
t t's user avatar
  • 1
1 vote
1 answer
57 views

I have a Vue 3 app hosted on Netlify, and the backend is hosted on Heroku. The login is a simple /login endpoint made with Express and Sequelize. It works well on desktop, but when I try to log in on ...
Luis's user avatar
  • 9
0 votes
0 answers
32 views

I am confused on the intended workflow with Sequelize. I have found some documentation that refers to a workflow that uses sequelize-cli, while others seem to create bespoke one-off javascript scripts ...
sherrellbc's user avatar
  • 4,938
0 votes
1 answer
56 views

In nodejs (sequelize) ,Add new key or column in MySql via migration but it is not defined in the model so how it update automatically in the model I have make new migration on adding new column and ...
Deepak Pradhan's user avatar
0 votes
1 answer
33 views

What am i missing? any help is appreciated. Thanks facility migration file await queryInterface.createTable("facility", { id: { allowNull: false, autoIncrement: true, ...
JPDR's user avatar
  • 1
0 votes
0 answers
36 views

I am working on a Node.js project using Sequelize-Typescript, and I'm trying to hash user passwords using lifecycle hooks (BeforeCreate and BeforeUpdate). However, I encounter an error related to how ...
Shahid Raza's user avatar
0 votes
0 answers
114 views

I have integrated sequlize into my NextJS project. Also, write the migration script for the schemas to be created into PostgreSQL. But, at the time of POST api call I am receiving the error saying: &...
TMA's user avatar
  • 1,519
0 votes
1 answer
71 views

I am using Sequelize ORM with mysql database for nodejs application. Somewhere I am stuck with one api whose job is just to show list based on the queryparam values. Issue is when I am not applying ...
user23602596's user avatar
1 vote
0 answers
41 views

I'm trying to build a simple next.js app using Sequelize CLI. However, there are issues with querying the database (migrations are run and all so DB connection is good). For instance: import { ...
Neil Middleton's user avatar
0 votes
1 answer
392 views

I am facing Sequelize CLI [Node: 21.7.1, CLI: 6.6.2, ORM: 6.37.1] | | Loaded configuration file "database/config/config.json". | Using environment "production". | ERROR: Access ...
Naeem Ahmed's user avatar
0 votes
1 answer
748 views

I'm trying to connect the DataBase with Sequelize and NodeJS but an error happen and I can't connect to DB. Through inspection I see that the 'config' variable is null and 'config.use_env_variable' ...
daonamthuan's user avatar
0 votes
0 answers
97 views

I dont know how to create a non-raw query using sequelize like this: SELECT COUNT(res.id) FROM ( SELECT clients.id, COUNT(client_addresses.id) AS total_client_addresses ...
Erick Avalos's user avatar
0 votes
0 answers
64 views

I was trying to make club, and students database I am using sequelize, my engine is innoDB and I wrote like this module.exports = (seq, DataTypes) => { const Club = seq.define("clubs",...
Mineppl13's user avatar
0 votes
1 answer
120 views

I'm trying to docker compose up a test version of a node.js app, and using sequelize-cli commands to create/migrate/seed the mysql database. While db:migrate works just fine (after I manually create ...
welew204's user avatar
  • 131
1 vote
1 answer
186 views

I need to run the migrations to create the tables in my database, currently my database is on an azure MySQL server, how do I run the migrations from my local host? Currently when I run the command it ...
juank's user avatar
  • 111
0 votes
1 answer
521 views

I was using sequelize-cli to create postgresql DB using the command: npx sequelize-cli db:create. My config.js file is const dotenv = require('dotenv') dotenv.config() module.exports = { ...
Foysal Khandakar Joy's user avatar
0 votes
0 answers
41 views

I'm currently doing a backend connection with a db, using node, postgresql and sequelize as orm. I've been getting the same error when I try to make a test using the route and creating a static user, ...
JoJo's user avatar
  • 1
0 votes
1 answer
37 views

I was very confused in selecting employee and leave data using the master number contained in both tables. Can someone help me, here is code: karyawan model file: 'use strict'; module.exports = (...
NinjaTea0161's user avatar
1 vote
1 answer
119 views

I have a simple migration that renames a column. The migration file looks like this: const tableName= 'aTable'; module.exports = { up: async (queryInterface, Sequelize) => { ...
lordoku's user avatar
  • 1,262
0 votes
1 answer
202 views

I am using sequelize cli to configure postgresql and run migrations/seeders. There are a couple of logs being printed unnecessarily and might also reveal internals of my service. I would want to ...
Tejas Bramhecha's user avatar
0 votes
0 answers
57 views

I am using sequelize models and created City model using the sequelize-cli. The model and table is getting created after applying the migration. I have also created a repository for creating records ...
Vatsal A Mehta's user avatar
0 votes
0 answers
99 views

I am trying to read a read only DB on a server. I was able to generate the models in TS files using the command sequelize-auto -o "./models" -d myDB -h webHostAddress -x Pwd -u root -p 3306 -...
overflowuser23's user avatar
0 votes
0 answers
93 views

This is my User Model module.exports = (sequelize, DataTypes) => { const User = sequelize.define("User", { email: { type: DataTypes.STRING, ...
kashif's user avatar
  • 51
0 votes
1 answer
513 views

This is my workflow: name: Run Tests on Pull Request on: pull_request: branches: - develop - staging - production jobs: test: runs-on: ubuntu-latest services: ...
Kurt Garcia's user avatar
0 votes
0 answers
22 views

What is the best way to store courses the user enrolled in and his progress and every lesson he finished and the time he stopped on, is that will be as a column in user table with Sequelize.ARRAY(...
White Hat Hacker's user avatar
0 votes
0 answers
157 views

The Sequelize changeColumn() function appears to exist and is referenced in e.g. this answer but the method there does not work for me (running V6). There is no documentation for changeColumn() on the ...
Dan's user avatar
  • 1,451
0 votes
0 answers
148 views

I'm trying to create a table using Sequelize migrations with a foreign key reference to a table in a seperate schema in my database. The issue appears to be that sequelize builds the query with the ...
David's user avatar
  • 99
2 votes
0 answers
759 views

If I change in .sequelizerc file babel packages to @babel/register and @babel/preset-env sequelize CLI stops working (the following code works as is). require("babel-register")({ presets:...
digitalniweb's user avatar
  • 1,142
0 votes
0 answers
92 views

In the code below, can I set "isPrimary" based on the value of "name"? 'use strict'; const { Model } = require('sequelize'); module.exports = (sequelize, DataTypes) => { ...
Wes's user avatar
  • 1
0 votes
0 answers
113 views

I'm using a SQLite3 database with Sequelize as an ORM. I have one model/table in the database named "cities" which I created before I set up sequelize-cli so there's no migration file that ...
TacoSnack's user avatar
  • 197
0 votes
0 answers
40 views

I have two tables "Table 1" and "Table 2". I am using nodejs and DB is postgres Table 1 | id | createdOn | | -------- | --------------------------| | 1 ...
Himashu's user avatar
  • 21
0 votes
1 answer
124 views

I'm using sequelize-cli, and generating migrations but we have to add the definitions and constraints manually even though we have already defined all of that in the model file. I've worked in django-...
Usama Yaseen's user avatar
1 vote
0 answers
132 views

Locally, I run yarn run migrate --name filename.js to run a specific database migration. In package.json I have: "scripts": { "migrate": "tsc && npx sequelize-cli ...
Nick's user avatar
  • 3,210
0 votes
1 answer
66 views

I have two models Category and Product. The product can have one Category, Category can have many products. This is a One-to-Many relationship. product.js file: import { DataTypes, Model } from '...
KiKo's user avatar
  • 1,720
0 votes
1 answer
927 views

I am trying to rename some columns in table and also wanted to add some new fields but Even I change the code in migration file of that table it's not reflecting any changes in the table. "No ...
Omkar Kawatgi's user avatar
0 votes
1 answer
883 views

module.exports = { async up(queryInterface, Sequelize) { const transaction = await queryInterface.sequelize.transaction(); try { await queryInterface.addColumn( 'Person', ...
Kshitij's user avatar
  • 11
0 votes
0 answers
225 views

Getting this error using sequelize cli for migrations it was working previously but dont know why it isnt now and there is no details to this error sequelize db:migrate:undo:all Sequelize CLI [Node: ...
Abdul-Latif's user avatar
0 votes
1 answer
195 views

I published my application couple months ago. Now I got idea to extend functionality, but I need add column to table. Database was initialized by command sequelize.sync() Of course I understand ...
Mormen's user avatar
  • 188
-1 votes
1 answer
669 views

How do I migrate sequelize with 2 table referencing each other? for example i have table roles & users, in table roles i have column created_by referencing to table users and in table users i have ...
Twigu's user avatar
  • 21
0 votes
1 answer
449 views

Due to updated requirements, I'm currently attempting to perform a database migration with two parts: Add a new column to the relation, and Update all the pre-existing records in the database with ...
egremont of yorke's user avatar
0 votes
1 answer
72 views

I have to be honest, I'm really, really lost on this issue. I have four PostgreSQL tables that I'm trying to query via Node/Express/Sequelize. I created the four tables using models that were auto-...
Jfk52917's user avatar
0 votes
0 answers
214 views

I want to add records into my tables. I am using create for that. I have two tables USERS and GROUPS with a many to many relationship(auto created users_groups). This is the code I have written const [...
Renee's user avatar
  • 341
1 vote
1 answer
67 views

I have a user with three foreign keys. Using sequelize how do i get the details of the reference when i use findAll module.exports = (sequelize, DataTypes) => { const User = sequelize.define( ...
John Adeniran's user avatar
0 votes
1 answer
263 views

I'm attempting to migrate my sequilizer models in my Node.js/Sequelizer application to my PostgreSQL database hosted on Google Cloud. Note: GCP requires that I connect using SSL (or some complicated ...
Jason Jacobson's user avatar
0 votes
1 answer
483 views

I have a nodejs project that uses sequelizejs and now the config file as a config.json looks like this: { "development": { "users": { "username": &...
blaterwolf's user avatar
0 votes
1 answer
1k views

I am working with nodejs web application, just started, I created a Postgresql database and added some tables using sequelize. In the process I created a table QuestionOptions which has columns Title:...
user21100383's user avatar
0 votes
1 answer
145 views

I have something like this in init-models.js USERS.belongsTo(ROLES, { as: "user_role_ROLE", foreignKey: "user_role"}); ROLES.hasMany(USERS, { as: "USERs", foreignKey: &...
Harshad BB's user avatar
0 votes
0 answers
149 views

I want to associate 3 models namely Project, Contractor and Contract const Project = sequelize.define('Project', {prjName: DataTypes.STRING}) const Contractor = sequelize.define('Contractor', {orgName:...
wasan's user avatar
  • 1

1
2 3 4 5
11