Skip to content

Mix task which runs Ecto migrations when switching branches.

Notifications You must be signed in to change notification settings

looshi/mix-checkout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

mix-checkout

Description: Mix task which runs Ecto migrations when switching branches.

Installation: For use in the Phoenix Framework, copy this file to your lib/mix/tasks folder.

Usage: mix checkout branch-name

How it works: Looks in the migrations folder and finds the common ancestor between your current branch and the branch you'd like to checkout. Rolls back the current branch to the common ancestor, then checks out the new branch and migrates forward. If both branches are at the same migration this task will not try to run any rollbacks or migrations.

Why: Useful for projects where the schema changes often and you need to switch back and forth between branches which contain different schemas.

About

Mix task which runs Ecto migrations when switching branches.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages