Add migration and prepare database