prepare database tables for migration