{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-migration-schema.json",
  "title": "Migration",
  "description": "Migration resource",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-databasemigration-api-openapi.yml#/components/schemas/Migration",
  "properties": {
    "assessmentId": {
      "description": "The OCID of the resource being referenced.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "compartmentId": {
      "description": "The OCID of the resource being referenced.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "databaseCombination": {
      "description": "The combination of source and target databases participating in a migration.\nExample: ORACLE means the migration is meant for migrating Oracle source and target databases.\n",
      "enum": [
        "MYSQL",
        "ORACLE"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/DatabaseCombination"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer and boolean types are supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing predefined tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "Defined tags for this resource. Each key is predefined and scoped to a namespace.\nExample: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`\n",
      "type": "object"
    },
    "description": {
      "description": "A user-friendly description. Does not have to be unique, and it's changeable. \nAvoid entering confidential information.\n",
      "maxLength": 400,
      "minLength": 0,
      "type": "string",
      "x-default-description": "null"
    },
    "displayName": {
      "description": "A user-friendly name. Does not have to be unique, and it's changeable. \nAvoid entering confidential information.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "executingJobId": {
      "description": "The OCID of the resource being referenced.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. \nFor more information, see Resource Tags. Example: {\"Department\": \"Finance\"}\n",
      "type": "object"
    },
    "id": {
      "description": "The OCID of the resource being referenced.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "lifecycleDetails": {
      "description": "Additional status related to the execution and current state of the Migration.",
      "enum": [
        "READY",
        "ABORTING",
        "VALIDATING",
        "VALIDATED",
        "ASSESSED",
        "WAITING",
        "MIGRATING",
        "DONE"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/MigrationStatus"
    },
    "lifecycleState": {
      "description": "The current state of the Migration resource.",
      "enum": [
        "CREATING",
        "UPDATING",
        "ACTIVE",
        "IN_PROGRESS",
        "ACCEPTED",
        "SUCCEEDED",
        "CANCELED",
        "WAITING",
        "NEEDS_ATTENTION",
        "INACTIVE",
        "DELETING",
        "DELETED",
        "FAILED"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/MigrationLifecycleStates"
    },
    "sourceDatabaseConnectionId": {
      "description": "The OCID of the resource being referenced.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "systemTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer and boolean types are supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing system tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "Usage of system tag keys. These predefined keys are scoped to namespaces.\nExample: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`\n",
      "type": "object"
    },
    "targetDatabaseConnectionId": {
      "description": "The OCID of the resource being referenced.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "timeCreated": {
      "description": "An RFC3339 formatted datetime string such as `2016-08-25T21:10:29.600Z`.\n",
      "format": "date-time",
      "type": "string"
    },
    "timeLastMigration": {
      "description": "An RFC3339 formatted datetime string such as `2016-08-25T21:10:29.600Z`.\n",
      "format": "date-time",
      "type": "string"
    },
    "timeUpdated": {
      "description": "An RFC3339 formatted datetime string such as `2016-08-25T21:10:29.600Z`.\n",
      "format": "date-time",
      "type": "string"
    },
    "type": {
      "description": "The type of the migration to be performed.\nExample: ONLINE if no downtime is preferred for a migration. This method uses Oracle GoldenGate for replication.\n",
      "enum": [
        "ONLINE",
        "OFFLINE"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/MigrationTypes"
    },
    "waitAfter": {
      "description": "You can optionally pause a migration after a job phase.\nThis property allows you to optionally specify the phase after which you can pause the migration.\n",
      "enum": [
        "ODMS_VALIDATE_TGT",
        "ODMS_VALIDATE_SRC",
        "ODMS_VALIDATE_PREMIGRATION_ADVISOR",
        "ODMS_VALIDATE_GG_HUB",
        "ODMS_VALIDATE_DATAPUMP_SETTINGS",
        "ODMS_VALIDATE_DATAPUMP_SETTINGS_SRC",
        "ODMS_VALIDATE_DATAPUMP_SETTINGS_TGT",
        "ODMS_VALIDATE_DATAPUMP_SRC",
        "ODMS_VALIDATE_DATAPUMP_ESTIMATE_SRC",
        "ODMS_FETCH_METADATA_SRC",
        "ODMS_FETCH_METADATA_TGT",
        "ODMS_VALIDATE",
        "ODMS_PREPARE",
        "ODMS_INITIALIZE_REPLICATION_INFRASTRUCTURE",
        "ODMS_INITIAL_LOAD_EXPORT",
        "ODMS_DATA_UPLOAD",
        "ODMS_METADATA_TRANSFER",
        "ODMS_INITIAL_LOAD_EXPORT_DATA_UPLOAD",
        "ODMS_INITIAL_LOAD_IMPORT",
        "ODMS_POST_INITIAL_LOAD",
        "ODMS_PREPARE_REPLICATION_TARGET",
        "ODMS_MONITOR_REPLICATION_LAG",
        "ODMS_SWITCHOVER",
        "ODMS_CLEANUP"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/OdmsJobPhases"
    }
  },
  "required": [
    "id",
    "databaseCombination",
    "displayName",
    "compartmentId",
    "type",
    "sourceDatabaseConnectionId",
    "targetDatabaseConnectionId",
    "timeCreated",
    "lifecycleState"
  ],
  "type": "object"
}