DT
Drizzle Team•9mo ago
laf_RSW

Trouble with tablesFilter

Im running a PostgreSQL Database to which i recently added the PostGIS extension. However if i try to push my schema it prompts me if i want to delete the tables "spatial_ref_sys" and "geometry_columns" both are created by the PostGIS extension. I dont want to delete those tables. But i also don't want to integrate them into my schema since they are managed by the extension. To try and combat this problem i added tablesFilter to my drizzle config. tablesFilter: ["!spatial_ref_sys","!geometry_columns"], This however changes nothing. But if i remove either of those filters it correctly filters out the table that i left in. Is there anything im missing?
5 Replies
midi
midi•9mo ago
without having read the documentation, logically that behaviour makes sense: !spatial_ref_sys will match geometry columns, and vice versa. maybe there's a way to blacklist instead of whitelisting? or a way to combine boolean logic so "!spatial_ref_sys && !geometrycolumns" you could also consider using pgTableCreator for prepending a known string you can match against "example*"
piechart
piechart•9mo ago
Try a single filter of the form !@(spatial_ref_sys|geometry_columns) Or you could also put those tables in a separate schema and use schemaFilter
laf_RSW
laf_RSWOP•9mo ago
That worked, thanks a bunch 🙂
aleix10kst
aleix10kst•6mo ago
@laf_RSW which solution did you apply? The form filtrr or moving these tables to another schema?
laf_RSW
laf_RSWOP•6mo ago
@aleix10kst thr form filter worked for me
Want results from more Discord servers?
Add your server