Update collections with new postgresql table

Expected behavior

After creating a new table in my database, there is a way to update forest admin ui to reflect the addition of that new table.

Actual behavior

Running lumber update gives the following error:

> We are not able to detect a lumber project file architecture at this path: <path to my app>.: Error: No "routes" directory.

After creating a /routes dir,running lumber update gives the following:

> The configuration file "<full path to>/config/databases.js" does not exist.

Context

"forest-express-sequelize": "^7.12.0"

Forest Admin was installed on a existing NodeJS Express / Sequelize app. Is there documentation on using lumber update in that scenario ?

Thanks,
Camille

Hi @cooki,

Thanks for your message.

Actually, the command lumber update has been made for the project that have been generated with Lumber.
For a project installed on an existing app, it is believed that the project owners will update and maintain their models on their own (as those models are probably not only used for Forest Admin).

Let me know if that makes sense.
Thanks!

Hey @adriguy that makes sense.

Maybe I should give you more context:

I created a my_model.js, ran the app which executes sequelize.sync({ alter: true });. Now there is a my_models table in my db.

Next I want to see that model as a collection in my Admin UI. How do I do that ?

Thanks,
Camille

@cooki,

Did you restart your server?
Are you sure your new collection is not just hidden (you could see it when hitting the “edit layout” button)?

1 Like

It was hidden :ghost: thanks a lot :slight_smile:

1 Like