mirror of
https://github.com/DBDiff/DBDiff.git
synced 2026-04-25 13:25:49 +03:00
[GH-ISSUE #25] Prevent drop table #14
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/DBDiff#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CodingPeak on GitHub (Aug 24, 2016).
Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/25
Is there a way to prevent drop table and drop
columnin the output?@jasdeepkhalsa commented on GitHub (Aug 24, 2016):
You can just use the
tablesToIgnore:and/orfieldsToIgnore:options in your.dbdifffile: https://github.com/DBDiff/DBDiff#dbdiff to ignore tables and fields which don't exist in the other database. Otherwise you cannot prevent table and column drops as this is a diff-ing algorithm meant to make both databases the same.@CodingPeak commented on GitHub (Aug 24, 2016):
I understand. But I'd really need to be able to add tables and columns without losing existing tables and columns and their data. A column name change for example, deletes and creates this column, deleting all column data with it.
@jasdeepkhalsa commented on GitHub (Aug 24, 2016):
If there was a way we could detect two columns are the same, then we may be able to do a less harsh operation like delete and re-create - unfortunately I don't think such a way exists.
You may wish to manually write the migration just for the column name update and then let DBDiff do its magic with the rest of the data diff
@jasdeepkhalsa commented on GitHub (Aug 25, 2016):
In the future we could introduce here, the ability to skip particular tests on particular tables perhaps?