Fix db migration scripts