atdatabases
atdatabases copied to clipboard
Add ability to exclude certain tables during `pg-schema` bindings generation
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.
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
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