Updates migration 008 to work on PostgreSQL.

This fixes a regression in 5bc46d8 which caused migration 008 to
fail when using PostgreSQL.

Fixes LP Bug #1112535.

Change-Id: I94f69c2dece3a5753eed3cc3cf7b63ba60208c5c