ticket:8 correct migration and tests