online_migrations
Creates, updates, deletes, gets or lists a online_migrations
resource.
Overview
Name | online_migrations |
Type | Resource |
Id | digitalocean.databases.online_migrations |
Fields
Name | Datatype | Description |
---|---|---|
id | string | The ID of the most recent migration. |
created_at | string | The time the migration was initiated, in ISO 8601 format. |
status | string | The current status of the migration. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
databases_get_migration_status | SELECT | database_cluster_uuid | To retrieve the status of the most recent online migration, send a GET request to /v2/databases/$DATABASE_ID/online-migration . |
databases_delete_online_migration | DELETE | database_cluster_uuid, migration_id | To stop an online migration, send a DELETE request to /v2/databases/$DATABASE_ID/online-migration/$MIGRATION_ID . A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. |
databases_update_online_migration | EXEC | database_cluster_uuid | To start an online migration, send a PUT request to /v2/databases/$DATABASE_ID/online-migration endpoint. Migrating a cluster establishes a connection with an existing cluster and replicates its contents to the target cluster. Online migration is only available for MySQL, PostgreSQL, and Redis clusters. |
SELECT
examples
To retrieve the status of the most recent online migration, send a GET request to /v2/databases/$DATABASE_ID/online-migration
.
SELECT
id,
created_at,
status
FROM digitalocean.databases.online_migrations
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}';
DELETE
example
Deletes the specified online_migrations
resource.
/*+ delete */
DELETE FROM digitalocean.databases.online_migrations
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}'
AND migration_id = '{{ migration_id }}';