Fixed database migrations and rollback.