Some useful SQL to look into upgrades

As of 4.0.0, upgrades are no longer tracked the same way. See this post for more details.

If you have the couchdb_medic_logs table in PostgreSQL, you can use this SQL to see the upgrade history.

SELECT
	(doc #>> '{to,time}')::date AS date,
	doc #>> '{to,version}' AS version
FROM
	couchdb_medic_logs

WHERE
	doc->>'_id' LIKE 'upgrade_log%';