I can’t seem to get the schema to update. My forestadmin-schema.json file had an issue in it regarding escaping some regex which is now fixed but I cannot get the schema to be recognised on the forest admin portal.
I have run forest schema:update from the cli but I get the following error
× The liana is incompatible for update: Your project is not compatible with the `lforest schema:update` command. You need to use an agent version greater than 7.0.0.
Well, you’re right, the error message doesn’t seem to be appropriate to your issue
Anyway, theoretically you should not need to use this command - restarting your agent should update your forestadmin-schema.json and send it to us.
Have you tried it already? Can you see any error logs when doing it?
FYI the last schema we received for your production environment was the 18th of November 2022.
I worked out what was happening. Might be good to have some awareness strategy on this going forward.
When adding new tables they are automatically hidden and there are no permissions set for them so they don’t appear in the list.
I only noticed this because I opened the editor and saw they had all been hidden.
Actually, when adding a new table in your Forest Admin development environment, it should be automatically visible (without any rights about it yet because in development you have all rights).
Are you sure it’s not the case?
Are you adding your new table in your development environment and then push the forestadmin-schema to your remote environments?
Perhaps I have got this set up wrong but I had assumed that when I push new code to production that the new tables/columns would appear there. We are experiencing this problem on a column today where the table isn’t showing the existence of the column that has been pushed and migrated and has data. Is there a process that I am unaware of that needs to happen to get it to show in production?
When you change your models, it’s expected that you’re doing it first in your development environment, and then push your code in production (never doing it directly in production). That’s why when doing it in development it detects the changes and update the forestadmin-schema (you’re supposed to push this file to your production repo afterwards), whereas this process is not done on production (to avoid any error).
It exists a simple way to bypass this, but it’s not really recommended.
When there is new elements in your production layout (column, table, etc), by default it is set as hidden to not disturb your current production layout and let the editor display it if it should. Here, the expected process is to either make it visible directly in production if you want, or to make all the layout changes required in development and then push those layout changes to your production environment using the development workflow.
I was using https://jsonlint.com/ to check the whole file in case there were issues. We had a small one around a regex which was sorted but it also found that we had duplicated ‘collections’ keys… It looks like it either generated 2 collections or we somehow merged with two. Ran db:migrate after fixing and it appears to be changing the schema file correctly now. Think the issue was that the schema file wasn’t being updated due to the duplicate collections so it wasn’t showing on either production or development.