Is it dangerous to re-migrate my database to recreate model definitions (by Lumber)?

Expected behavior

I have new tables in my database. I also have some structure/field changes to some tables. I want to refresh the model definitions to reflect this.

Since making many manual changes to the model definitions would be very time consuming, I am wondering if I can simply re-migrate the database. Will I lose any existing setups on the Front End (segment definitions, etc)?

Actual behavior

Lumber creates model definitions during the database migration. This is currently a one time occurrence.

Is there an easy/quick way to update the JSON model definitions in my project’s /models folder? Any way to use Lumber (or whatever) to regenerate?

Failure Logs



Please provide any relevant information about your setup.

  • Package Version:
  • Express Version:
  • Sequelize Version:
  • Database Dialect: Postgres
  • Database Version:
  • Project Name: UCM
1 Like

Hello @rvastag :wave:

You can use lumber generate to create a new temporary project and merge the new models inside your old project :slight_smile:.

Your layout configuration is saved on FA end, but be careful not to delete any smart feature you may have implemented.


How is this “merge” accomplished? Copy all the json files from the temporary project’s /model folder to the /model folder of my real project? What about other json files such as .forestadmin-schema.json or the json files in the /forest folder?