How to Upgrade Typo
I use Typo, and I have since the early 4.0 days. Each upgrade brings a slew of new messes to the table. I recently discovered that apparently there are only two people behind Typo development, and with it being a Ruby/Rail project that does offer some explanation as to the sucky edges. With newfound compassion, I will explain my work to the other peoples around.
I use PostgreSQL because it's awesome, MySQL sucks, and SQLite is dippy. In retrospect, I wish that my blog had used SQLite, but I didn't, and I have no idea how hard it would be to migrate to SQLite. So, I use PgSQL because it's rad. SQLite fits the bill, but didn't make the final cut.
When upgrading to from 5.0.x to 5.2, here's the rub:
- Backup your database first: pg_dump -U myuser -f pre-migration.db.sql mydb
- Save a copy of your typo directory
- Get the typo tarball, and untar it.
- Install RAILS locally (untar rails, copy all the stuff from vender/rails to your typo directory's vender.)
- Setup your database.yml
- Migrate your database by hand: "rake db:migrate"
Watch your postgresql output:
the db:migrate couldn't remove an index, because it didn't exist. So I killed it.
create index "index_contents_on_blog_id" on contents (id, blog_id);
It may seem like a lot for dirty talk, but after that things are mostly complete. Next Week: Index Optimization for Typo.