Dropping Sequelize
This is the official documentation of the @forestadmin/agent
Node.js agent.
To connect your new agent to a SQL database, you have two options:
Keep Sequelize | Connect directly to the database | |
---|---|---|
How | Use the | Use the |
For whom | Customers that have in-app installations and use the | Others that only used |
Benefits | Migration is less error-prone | You no longer need to maintain |
Cons | You may need to rename your tables and fields to match the old install |
If you wish to migrate to the new @forestadmin/datasource-sql
connectors, you will need to:
Change the dependency in your agent:
Then you can delete your Sequelize
models and change the index
file.
Then, depending on your database structure, you may need to rename both your tables and columns: the new agent will use the same names as your database, but depending on your previous Sequelize configuration, Sequelize
may have renamed all tables and fields to camelCase
.
Renaming tables and fields can be done by following this example:
Last updated