Tsugi DB Upgrade Required Upgrade in Master (start of 0.4.x)

Attention Tsugi Production folks.

If you have been following along and doing database upgrades when I told you – my Tsugi commits this morning:

https://github.com/tsugiproject/tsugi-php/commit/cd3bfe8431a6035e4be702714ca281c36f75e832
https://github.com/tsugiproject/tsugi-php/commit/e725fe86a4a41ec85b623cb0bb5c0547daef1ba9

Will not even be noticed. These commits are the first that *depend* on the recent database upgrades being in place.

If you have been ignoring my messages and upgrade from a master a month ago to current master with a git pull, your LTI launches will break because there is now SQL in LTIX in master that depends on:

lti_user.image
lti_context.ext_memberships_id
lti_context.ext_memberships_url
lti_context.lineitems_url
lti_context.memberships_url

As well as “deleted” columns in all of the core tables.

If you upgrade and “brick” your Tsugi (which I highly doubt will happen), there are two ways to unbrick a Tsugi:

(1) Go straight to the admin UI

https://www.py4e.com/tsugi/admin/

This code specifically tries to limit how much of Tsugi is working (i.e. there are no LTI launches involved in this page) for the admin interface to work. So go to admin, enter the password and do the database upgrade and things should pop back to normal. This is the preferred unbrick trick and works almost all the time.

(2) Log in and drop back to a tag if you are checking out my Tsugi – I made a tag/release with the code that adds all the needed fields, but does not depend on those fields. It can work before or after a database upgrade:

https://github.com/tsugiproject/tsugi/releases/tag/0.3.2

A simple

git checkout 0.3.2

Should do this trick. Launches should work even with a pretty old non-upgraded DB. Log in, upgrade the database, and then re-checkout master and all should be well. You might need a tiny DB upgrade after going back to master – but it does not affect the LTIX runtime.

All my servers py4e.com, wa4e.com, tsugi.com and my Coursera auto grader are all running master solidly as of an hour ago.

If you get stuck, let me know – I will be watching my email.

Leave a Reply

Your email address will not be published. Required fields are marked *

By submitting this form, you accept the Mollom privacy policy.

*