[api] fix database migration with rails 4