Search code examples
node.jsloopbackjs

How to remove Loopback model and references from database


I removed a model fully from my app: deleted the model.js and model.json from models, deleted a relation in another model, and erased it from model-config.json.

However, the table created for the model, and the column in the other model remain in the DB (in all environments). I tried auto-migrating, but they're still there.

Do I need to manually go through all databases and drop the table and column manually, or can I tell LB to pick up the changes on its own somehow?


Solution

  • Ended up doing it manually - in 3 databases :(

    I'm closing the question, but willing to reopen if someone had a good answer.