Avoid Fields Blocking Development

Hey Forest!

Kind of a broad question here. When we introduce new fields to our database tables naturally they are not added to our production databases immediately but remain on staging for testing. However if we add said fields to our database schemas to say “staging” this creates a blocker for merging staging->production for other changes we want to deploy as it would break the table with the new field in production. Is it possible to circumvent this by either

  1. Using some type of env flag in the schema file
  2. Not enabling the new field immediately in the layout so it’s not queried in prod? We can’t edit the layout once we push due to the ‘unknown column’ error.

Thank you in advance!

1 Like

Hi @Arda_Yurdakul :wave:

Unfortunately, we impose schemas to be similar before deploying changes.
I’ll ask around if we have a trick in store to circumvent it otherwise I’ll push your request to our product team. :thinking:

Hey @Romain_Coudour :wave:

Thanks for getting back! Just in case there was a misunderstanding by merging I meant backend code, not Forest layout changes. The scenario would be:

  1. We push some new fields to staging
  2. We develop some other backend features that need to be merged to production but the new fields in staging blocks us.

Is it not possible to get rid of this blocker as well? Wanted to make sure before I mark the thread as resolved.

Thank you once again :pray:

Hi @Arda_Yurdakul :wave: Unfortunately if you add a new field, it is part of your schema and after that your layout.
We can’t be sure you do not use this field inside your layout for anything, it’s why you can’t push or deploy your layout without a perfect synchronisation to avoid crash somewhere.
Let me know if it is clear enough :pray:

Hey again,

Though it’s unfortunate for us in this case it makes sense.

Thank you both for your answers :+1: