willbryant / kitchen_sync

Fast unidirectional synchronization - make or efficiently update a copy of a database, without slow dumping & reloading
MIT License
282 stars 35 forks source link

Recognise/skip generated columns #71

Closed willbryant closed 4 years ago

willbryant commented 5 years ago

MariaDB 5.2+, MySQL 5.7+, PostgreSQL 12+ all support generated columns. Currently we will ignore the fact that they are generated and attempt to write to them, which of course won't work.

JC1738 commented 5 years ago

@willbryant

I am not sure if this is the same issue, but if you are syncing from Source A to Target B a table named foo:

If Target B.foo has an extra column that doesn't exist in Source A.foo will that column be ignored?

Thanks, Jim

willbryant commented 5 years ago

No, Kitchen Sync will offer to alter the schema at the receiving end and refuse to run until you do. It doesn't support syncing with any kind of deliberate schema mismatches at present, with the sole exception that you can ignore entire tables.