How to ignore some database tables from being imported to forest as models


We have many tables in our database but I want to import only some of them to forestadmin. Using forest cli : forest schema:update it creates models for all my tables. I would like to know if there is a way to ignore or skip some tables so It will not be imported to forest backend.


Hello @Adel_de_Clevermate

With forest-express

You can specify the list of models which will be used by forest admin Include/exclude models - Developer guide

However, you seem to want to limit the generated models. using the CLI there is no “native” way that I can think of.
The CLI performs an introspection of the DB, there is no parameters to whitelist/blacklist tables.

Maye writing a bash script which delete all files in your model folder, but the one you want to keep would be the easier way?

With @forestadmin/agent

As per documentation you no longer need to generate sequelize model files, and can specify a whitelist/blacklist of the collection that should go into forest.

1 Like