cleanup_migration
Remove records created during a migration from staging and target tables. Use to clean up after test runs or roll back failed migrations.
Instructions
Remove records that were created during a migration — both from the staging table and from the target table (e.g. incidents).
Use this if: - The test migration created records you want to delete before the real run - A migration went wrong and you want to start fresh - The client asked you to roll back
IMPORTANT: Always ask the user for explicit permission before calling this tool. Show them exactly how many records will be deleted and from which tables. Only proceed after they confirm with "Yes, delete them" or similar.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| staging_table | Yes | ||
| target_table | Yes | ServiceNow target table to clean up (same table that was used in build_artifacts) | |
| project_keys | No | Project / object keys to scope the cleanup (e.g. ["EMAL","KAN"]) | |
| project_field | No | Staging table column that holds the project key (e.g. u_jira_project). Used to scope deletion. Leave blank to delete all staging records. | |
| confirmed | Yes | Must be true — user has explicitly confirmed the deletion |