Questions tagged [sequelize-cli]

The Sequelize Command Line Interface (CLI) supports for migrations and seeders.

The Sequelize Command Line Interface (CLI) supports for migrations and seeders.

With migrations and seeders it's possible to transfer an existing database into another state and vice versa: those state transitions are saved in migration storage and seeder storage accordingly, which describe the way how to get to the new state and how to revert the changes in order to get back to the old state.

Useful links:


Related tags:

499 questions
-1
votes
1 answer

How do i migrate sequelize in node js with 2 table referencing each other?

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 column roles_id referencing to roles, when i tried…
Twigu
  • 27
  • 5
-1
votes
1 answer

How to seed pivot tablet with sequelize + node js

I have two tables with relation many to many, roles table and permissions table, i need to seed my table roles_permission, with all initial permissions set in the seeder of permissions, i searched how to do this in the documentation of the sequelize…
Matheus Martins
  • 139
  • 1
  • 14
-1
votes
1 answer

Copying a timestamped file, renaming it and changing contents on the fly

I had about 30 migration files (sequelize) looking like the following that I wanted to copy into migrations for another table, while changing the migration file's name (sequelize relies on utc-timestamp) and changing the table-name in the file at…
rohit_wason
  • 177
  • 2
  • 9
-3
votes
1 answer

How to run AND and Or operator with Sequelize in Node.js

I am new to Node.js, am trying to run a 'And' and 'OR' operator in Sequelize, the MySQL query is this SELECT * from User WHERE (role = 'INSTRUCTOR') AND ((pix <> null) OR (description <> null)) OEDER BY id DESC The above MySQL query is what I want…
stach
  • 23
  • 3
1 2 3
33
34