Modified automigration to work with arbitrary groups. Added docs for migrations and the CLI tools to run them.