Modifying migration scripts
You can perform several modifications to a migration script from the Migration Script window.
The following image shows the migration script window:
To change object elements in a script
- Select File > Open or File > Recent Files to open the migration script whose objects you want to change.
- In the left pane of the migration script window, select AR System Objects, then select the type of object you want to modify.
- In the right pane, right-click on the object to modify.
From the pop-up menu that appears, select an action.
The available selections in the menu depend on the type of object you have selected. For example, if you selected a regular form, the Data Mode, Number of Entries, and Search Criteria selections are not available.
- If you are prompted to confirm your selection, click Yes to proceed, or Cancel to stop the modification.
- Select File > Save to save the modified script.
To add or remove a server in a script
- In the right pane of the Migration Script window, click the migration script for which you want to add or remove a server.
- In the left pane, click Servers.
- Perform one of the following actions:
- To add a source or destination server to the list of servers associated with the script:
- Select Servers > Add Server.
- In the Login dialog box, select a server and enter your login name along with your password, and click OK.
- To remove a destination server from the list:
- In the right pane of the script window, select the server you want to remove.
- Select Servers > Remove Server, or right-click on the listed server and select Remove Server.
- In response to the confirmation prompt, select Yes to remove the server, or No to cancel the server removal.
- To add a source or destination server to the list of servers associated with the script:
To edit server options for a script
You can add any number of servers to a script. For example, you might have an existing script that moves objects from a development server to a quality assurance server. You can edit the script by removing the development server and adding a production server, along with reassigning all scripted objects' source and destinations based on the new servers. This ensures that all objects originally migrated to quality assurance are migrated to the production server.
- Open the migration script whose server options you want to change.
- In the right pane of the script window, select the server whose options you want to change.
- From the Servers menu, select the option you want to change:
- Change Login Information—Displays the Login dialog box, from which you can enter a new user name and password, or change server account information for the selected server.
- Add Server—Displays the server list. You can select a server to add to the script.
- Add Migrator File—Displays the Open dialog box with the list of .migrator files in the Scripts directory. You can select a file to add to the script.
- Remove Server—Enables you to delete a server from the script.
- Remove File—Enables you to delete a file from the script.
- Change History Option—Displays the Change History Merge Option. See Setting-the-change-history-options.
- Change History String—Displays the Change History String dialog box, from which you can change the string used when change history diaries are merged. See Setting-the-change-history-options.
- Default Prefix Options—Displays the Prefix dialog box, from which you can change prefix information. See Migrating-objects-to-the-same-server.
- Use Definition Files for Backup—Use definition (.def) files as a backup file type. See Enabling-backup-to-a-destination-server-before-migrations.
- Use Migrator Files for Backup—Use .migrator files as a backup file type. See Enabling-backup-to-a-destination-server-before-migrations.
- Back Up All Objects/Back Up Specific Objects—Enables you to back up all files on a destination server, or selected files. See Enabling-backup-to-a-destination-server-before-migrations.
- Back Up Directory—Enables you to select a directory for storage of backup files. See Enabling-backup-to-a-destination-server-before-migrations.
To change the source or destination in a script
- In the Migration Script window's left pane, click AR System Objects.
- In the right pane, click the object you want to modify.
- Select Objects > Change Source or Objects > Change Destination.
To change the prefix options in a script
- In the right pane, click the object whose prefix options you want to change.
- Select Objects > Prefix Options.
- In the Prefix dialog box, change the options. See Migrating-objects-to-the-same-server.
To change the destination name
- In the right pane, click the object whose destination name you want to change.
- Select Objects > Destination Name.
- In the Destination Name dialog box, enter the new destination name.
To remove an object from a script
- In the right pane, click the object you want to remove from the script.
- Select Objects > Remove Object.
- In response to the prompt, click Yes to confirm the removal, or No to cancel it.
To add descriptions and Before or After commands
Before and After commands enable you to add executable commands to a migration script, such as verifying that servers are running before a migration begins, sending email notifications related to a migration, or sending files to a remote server after a migration.
- If the Description window (located at the bottom of the Script window) is not open, select View > Description Bar.
- (Optional) Click the Description button and type a description for the command or script.
- Click the Before Command or After Command button and type a Run command line in the window for executable file types such as .exe,.bat, or .com.
The Before command runs before a scripted migration occurs. The After command occurs after a scripted migration is complete. - Run the script to verify that the command you created works.
Mouse shortcuts
When performing scripting procedures, you can use the following mouse shortcuts:
- If Migrator is not running, double-click a script file from its saved location to launch Migrator and open the script in a window.
- Right-click an object in the right pane of a server window to open specific menu options available for that object.
- Top tree options in the left pane of the script window.
For example Forms and Groups, cannot be accessed by way of a right-click. If you go deeper within the tree view by clicking on objects, you can access lower-level objects by right-clicking. - Click the Server tree view, then double-click Script Files, to view the files that are stored in the Script Files directory.
- Right-click a migration status line in the migration status pane under the All or Scheduled tabs to open a menu containing options for changing a scheduled migration.