node.jssequelize.jsfeathersjsfeathers-sequelize

Read Only Schema with Feathers.js and Sequelize


I am using Feathers.js with Sequelize to create a REST API for my MySQL database. Everything seems to work for GET operations. However I am getting the following error in the console:

error: Unhandled Rejection at: Promise  {"_bitField":18087936,"_fulfillmentHandler0":{"name":"SequelizeDatabaseError","parent":{"code":"ER_TABLEACCESS_DENIED_ERROR","errno":1142,"sqlState":"42000","sqlMessage":"CREATE command denied to user 'f_admin'@'localhost' for table 'f_sales'"...

I think Sequelize is wanting to make changes to my schema but I don't want it to do that. How can set it up so that the I can CRUD records but not make changes to the schema?


Solution

  • Don't call Sequelize.sync() and Sequelize won't try to create any tables.