script to migration table groups