BUG: Fix database migrations