pgsync icon indicating copy to clipboard operation
pgsync copied to clipboard

[Feature] schema-only should confirm before existing table is dropped!

Open sunapi386 opened this issue 2 years ago • 1 comments

The flag --schema-only is misleading, if it drops the table there needs to be user confirmation!

Although the documentation states so, it would be easy to miss. Please enforce and add confirmation (y/n) in code before proceeding. Optionally, add a flag --drop-if-conflict and drop table if the schema sync fails.

Currently the docs say

Sync schema before the data (this wipes out existing data)

pgsync --schema-first Specify tables

pgsync table1,table2 --schema-first Or just the schema

pgsync --schema-only

sunapi386 avatar Jan 09 '23 21:01 sunapi386