Fixes #110. This also adds CI tests for schema upgrading/downgrading on both SQLite and MySQL/MariaDB.