I have an API coded with Node.js and I use a SQLite database with Sequelize. When I make updates, I use a transaction to rollback if something failed during the
I am trying to findAll records included nested tables, but did not understand how could I filter included tables by where clause. Here are the words: const play
I've been trying for awhile to set id (primary key) for my Users table as UUID. However, I keep getting this error: Field 'id' doesn't have a default value, whe
I have a post and a notification model. notification has a onPostId FK. When a post is deleted how can I let sequelize know to delete all the notifications that
Was looking to drop an enum and did it incorrectly by deleting the rows from the pg_enum table. I should have removed it with this: DROP TYPE IF EXISTS "enum_Or
So when I query without attribute: exclude... it returns me the correct user, but when I insert that in the query it returns a completly different user. Here is
I'm using Sequelize (Postgres) and I'm trying to dynamically create schemas and run migrations in them. In other words, I'm not using sequelize.define, because
I am trying to use the beforeBulkDestory Sequelize hook on a user delete that will switch the deleted column boolean to true prior to updating the record to add
I'm working on a Discord bot using node.js modules and Sequelize to database, and I want to add a command that users type and the bot registers them in database
I'm using Sequilize to program a common Student - Course relational database in NodeJS. The 2 Models are associated through the automatically generated relation
We are using sequelize package to connect to mssql server. Our backend code is in javascript. We have a working code like below: const sequelize = new Sequelize
I am trying to use the AWS RDS Proxy on my lambda to proxy our database (Aurora MySQL). I wasn't able to find any specific instructions for Sequelize, but it se
I have an Apollo GraphQL projects where I have created my own Query and Mutations. I have done using mock data and Query and Mutation works fine. But when I am
I have recently tried to add the column "last_sign_in_at" to the User table (named "UsersTable" in our db) using sequelize. I've created the migration file and
When I try to insert new category, I got this error: error: column "image" does not exist sql: 'INSERT INTO "Categories" ("id","createdAt","updatedAt") VALUES
I am trying to get average rating of an associated Model "Rating" of Model "User" using sequelize. sequelize.sync({logging: false}).then(()=>{ return Mode
please help in this matter. So my scenario is that I have driver app (flutter) that fetch ongoing orders that needed to be delivered. I would like to fetch orde
SELECT id, ( 6371 * ACOS( COS( RADIANS( db_latitude ) ) * COS( RADIANS( $user_latitude ) ) * COS( RADIANS( $user_longitude ) -
I have a PostgreSQL database with Sequelize ORM and I want to listen for new entries. How should I do? Should I use Sequelize afterCreate hook? Can someone help
So I have a many-to-many relationship with Sequelize. This code gives me an array of all the categories associated with the Post. It works to get this data. How