atdatabases icon indicating copy to clipboard operation
atdatabases copied to clipboard

Add ability to exclude certain tables during `pg-schema` bindings generation

Open roman-vanesyan opened this issue 4 years ago • 1 comments

Currently pg-schema scans whole DB and print any non-system table including meta tables like atdatabases_migrations_applied and atdatabases_migrations_version. I would like to see some mechanism in order to exclude them from the generated code, simple --exclude-table table_name1, table_name2 option may be sufficient.

roman-vanesyan avatar Jun 09 '21 10:06 roman-vanesyan

I would be happy to accept a PR for this. This can be added as a config option in https://github.com/ForbesLindesay/atdatabases/blob/8f7f7a91efc7d3095f242d5c1d361b4458a92e60/packages/pg-config/src/PgConfig.ts#L133

ForbesLindesay avatar Jul 06 '21 12:07 ForbesLindesay

This is now supported via includeTables and ignoreTables in your pg config: https://github.com/ForbesLindesay/atdatabases/blob/master/packages/pg-config/src/PgConfig.ts#L301-L315

ForbesLindesay avatar Aug 24 '22 17:08 ForbesLindesay