-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Milestone
Description
As features are merged into the main codebase, redeploy dev.buttonweavers.com with those changes.
Generic procedures for use in deployments:
Use a checked-out copy of buttonmen-master to find a sort order for database updates:
cd deploy/database/updates/
UPDATES="<space-separated list of DB updates>"
git log --reverse --first-parent --oneline $UPDATES
UPDATES="<space-separated list of DB updates, now in the order reported by that output>"Database update plan:
# in the correct git working directory
git pull origin dev
cd deploy/vagrant
vagrant provision
# on the sandbox or dev VM
UPDATES="<space-separated ordered list of DB updates, as determined above>"
mysqldump -u root buttonmen | sed -e 's/),(/),\n(/g' > ~/buttonmen_db.$(timefmt).sql
cd /buttonmen/deploy/database/updates
for update in $UPDATES; do
echo "APPLYING: $update"
cat $update | mysql -u root buttonmen
done
mysqldump -u root buttonmen | sed -e 's/),(/),\n(/g' > ~/buttonmen_db.$(timefmt).sqlHow to diff database dumps:
diff --side-by-side --width=234 --left-column buttonmen_db.* | lessWithin less, search for lines that don't end with ( to skip past common lines: /!\($
Metadata
Metadata
Assignees
Labels
No labels