eulerto / pgquarrel

pgquarrel compares PostgreSQL database schemas (DDL)
BSD 3-Clause "New" or "Revised" License
389 stars 42 forks source link

Exclude table #92

Open grandegoiania opened 3 years ago

grandegoiania commented 3 years ago

These filters was useful to me include-table = include table(s) with regex exclude-table = exclude table(s) with regex exclude-column = exclude column(s) of all tables with regex exclude-table-column = exclude the combination of table and column with json array

eulerto commented 3 years ago

You provided 3 features in the same PR.

  1. filter table;
  2. filter table column;
  3. filter table + column.

Please submit one PR per feature. It is easier to review and merge it. Item 1 has been already in my radar, please create a PR with it. Item 2 and 3 are the same feature. IMO the syntax should be:

include-table-column = '*.columna, table1.*, table2.columnb'
exclude-table-column = 'table3.columnc, *.columnd'
grandegoiania commented 3 years ago

I will separate the features, but let me explain my idea (what I needed): 1- table: include or exclude some tables (forgot to tie with schema) 2- column: exclude some columns that matches (column_name regex) on all tables 3- table-column: exclude a column of a specific table, not all columns with that name