[Feature] schema-only should confirm before existing table is dropped!
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 3.5k
- Forks
- 219
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the CLI handling for --schema-only and the schema-sync path that drops existing tables; review the current documentation and the existing confirmation conventions. Done means the destructive action is confirmed before proceeding, with the scope of an optional --drop-if-conflict flag resolved and covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, ruby
- Domain
- cli, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100