Open eradman opened 6 years ago
There's no option for this currently but it really should be added. If you're using migra
via the API you can work around this by changing the contents of the inspection objects manually yourself.
The partitioning case more generally is a big missing feature. High priority on the list of features to add, when I find the time!
My workaround was to restore the schema to an ephemeral database before running the comparison
tmp_url=$(pg_tmp)
pg_dump -T 'log_*' -s $db_url | psql -q $tmp_url
migra --unsafe $tmp_url ...
Here I used the -T
option of pg_dump
, but of course in a temporary database I can drop any other kind of object as well.
@eradman still haven't implemented an ignore option but have implemented partitioning support so you may not need to filter partitioned tables out manually any longer.
Thank you--partitioning support is even more useful than an ignore option.
It would be very convenient to have an option for excluding functions from migration. Because we use another utility to synchronize stored functions. We have a lot of changes in stored functions. These changes clog the output of the migra utility.
Is it possible to specify a list of object names to ignore? (regex or glob)
In some case I am using native PostgreSQL partitioning and it would be nice to ignore those when generating a schema diff.