How to upgrade from 1.0.0 to 1.0.1 with manual code update?



  • I’d prefer to deploy the code from my own git repo, since I may have some code changes periodically. Can somebody suggest the proper way to migrate DB only for the upgrade? Thanks!



  • A Git repo doesn’t stop you from doing an upgrade. Just upgrade and commit all the changes.

    Before doing so I’d make a DB backup and commit this backup file to allow rolling back later. A git history isn’t of much worth if you don’t have a matching database.

    For myself I use a Git repo filled with distributed files. Like

    1.0.0---B-----1.0.1---B-----1.0.2---B----...
             \             \             \
              \             \             \--L''--L''--L''--L''--L''   <= life site
               \             \ ---L'---L'---L'---L'---L'
                \--L----L----L----L----L
    

    Where:
    1.0.0, 1.0.1, 1.0.2, … unmodified installations made from distribution ZIP, then upgraded for each release.
    B = database backup, backup file committed into the repo.
    L = local code changes

    For each release I create a new branch on the previous unmodified installation, upgrade, then make a copy of the branch with previous local changes and rebase that to the new release. Sometimes a straight rebase is too complex, then I cherry-pick commit by commit from the previous branch, adjusting them as needed.

    All this requires to understand a Git repo not as a backup tool or dump yard, but as a tool allowing to build code like with Lego bricks (one brick = one commit), allowing to copy and move commits as needed. Reading up on ‘topic branches’ and on how to rebase them is a good starter.

    P.S.: 1.0.2 isn’t released, yet. I put it into the graph for illustration purposes.


 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.