phalcon / migrations

Generate or migrate database changes via migrations.
https://docs.phalcon.io/latest/en/db-migrations
BSD 3-Clause "New" or "Revised" License
28 stars 23 forks source link

ISSUE-97: Renaming column does not drops column on morphTable #123

Closed BeMySlaveDarlin closed 2 years ago

BeMySlaveDarlin commented 2 years ago

Hello!

In raising this pull request, I confirm the following (please check boxes):

Small description of change: During table morphing, if table column was just renamed, it will drop it and add new one, which will cause data loss.

Changed behavior to checking field meta and neighbours to process correct morphing

Thanks

codecov[bot] commented 2 years ago

Codecov Report

Merging #123 (1b6b57d) into master (0e76b22) will increase coverage by 1.52%. The diff coverage is 90.00%.

@@             Coverage Diff              @@
##             master     #123      +/-   ##
============================================
+ Coverage     56.20%   57.72%   +1.52%     
- Complexity      529      550      +21     
============================================
  Files            21       22       +1     
  Lines          1482     1533      +51     
============================================
+ Hits            833      885      +52     
+ Misses          649      648       -1