template and migration