Schema not changing when running rails db:migrate

Feature(s) impacted

Schema upgrading

Observed behavior

I created a migration to add a column to a table. I ran rails db:migrate the schema.rb file changed and the column is added. But the .forestadmin-schema.json doesn’t change and when I deploy the new column in production, the column is not visible in Forest, but it is visible in the database.

Expected behavior

I expected the column to be visible in forest admin, and the .forestadmin-schema.json to change when I ran rails db:migrate

Failure Logs

No error.

Context

Please provide in this mandatory section, the relevant information about your configuration:

  • Project name: Lakaa
  • Team name: Lakaa
  • Environment name: Production
  • Agent type & version: gem ‘forest_liana’ version 7.4.5
  • Recent changes made on your end if any: just installed

Hello @adrilef,

Thanks for your message and welcome to our community :raised_hands:

Well, actually you are not supposed to change the schema directly on your production environment.
The process is to change your schema in your development repository, restart your server (at this point, the forestadmin-schema file will be updated) and then commit this file in your production repository.

Does it make sense to you?

Thanks.

1 Like

Hello @anon34731316
Thanks for your quick answer.

Understood ! Works better this way.

Thanks !

Adrien

1 Like