Applying, auditing, and controlling Online DDL

Vitess provides two interfaces to interacting with Online DDL:

  • SQL commands, via VTGate
  • Command line interface, via vtctl

Supported interactions are:

Running migrations

To run a managed schema migration, you should:

  • Formulate your DDLs (CREATE, ALTER, DROP) queries
  • Choose a ddl_strategy

When the user submits an online DDL, Vitess responds with a UUID, a job Id used to later track or control the migration. The migration does not start immediately. It is queued at the tablets and executed at some point in the future.

Via VTGate/SQL

1. mysql> set @@ddl_strategy='vitess';

3. mysql> alter table corder add column ts timestamp not null default current_timestamp;
4. +--------------------------------------+
5. | uuid                                 |
6. +--------------------------------------+
7. | bf4598ab_8d55_11eb_815f_f875a4d24e90 |
8. +--------------------------------------+

10. mysql> drop table customer;
11. +--------------------------------------+
12. | uuid                                 |
13. +--------------------------------------+
14. | 6848c1a4_8d57_11eb_815f_f875a4d24e90 |
15. +--------------------------------------+
  • @@ddl_strategy behaves like a MySQL session variable, though is only recognized by VTGate. Setting @@ddl_strategy only applies to that same connection and does not affect other connections. The strategy applies to all migrations executed in that session. You may subsequently set @@ddl_strategy to different value.
  • If you run vtgate without --ddl_strategy, then @@ddl_strategy defaults to 'direct', which implies schema migrations are synchronous. You will need to set @@ddl_strategy='vitess' to run followup ALTER TABLE statements via Vitess.
  • If you run vtgate --ddl_strategy "vitess", then @@ddl_strategy defaults to 'vitess' in each new session. Any ALTER TABLE will run via Vitess online DDL. You may set @@ddl_strategy='gh-ost' to make migrations run through gh-ost, or set @@ddl_strategy='direct' to run migrations synchronously.

Via vtctldclient

You may use vtctldclient to apply schema changes. The ApplySchema command supports both synchronous and online schema migrations. To run an online schema migration you will supply the --ddl-strategy command line flag:

1. $ vtctldclient ApplySchema --ddl-strategy="vitess" --sql "alter table product add column ts_entry TIMESTAMP NOT NULL" commerce
2. c26f3b5e_6b50_11ee_808b_0a43f95f28a3

You my run multiple migrations withing the same ApplySchema command:

1. $ vtctldclient ApplySchema --ddl-strategy="vitess" --sql "alter table corder modify price bigint unsigned default null; create table sample (id int primary key); drop table if exists some_other_table" customer
2. d729b47e_6b52_11ee_808b_0a43f95f28a3
3. d72b644f_6b52_11ee_808b_0a43f95f28a3
4. d72d230d_6b52_11ee_808b_0a43f95f28a3

ApplySchema accepts the following flags:

  • --ddl-strategy: by default migrations run directly via MySQL standard DDL (aka direct). This flag must be aupplied to indicate an online strategy. See also DDL strategies and ddl_strategy flags.
  • --migration-context <unique-value>: all migrations in a ApplySchema command are logically grouped via a unique context. A unique value will be supplied automatically. The user may choose to supply their own value, and it’s their responsibility to provide with a unique value. Any string format is accepted. The context can then be used to search for migrations, via SHOW VITESS_MIGRATIONS LIKE '<the-context>'. It is visible in SHOW VITESS_MIGRATIONS ... output as the migration_context column.

Tracking migrations

You may track the status of a single or of multiple migrations. Since migrations run asycnhronously, it is the user’s responsibility to audit the progress and state of submitted migrations. Users are likely to want to know when a migration is complete (or failed) so as to be able to deploy code changes or run other operations.

Common patterns are:

  • Show state of a specific migration
  • Show all running, complete or failed migrations
  • Show recent migrations
  • Show migrations ordered by most-recent first.
  • Show n number of migrations, skipping m rows.

Via VTGate/SQL

Examples for a single shard cluster:

1. $ mysql commerce
1. mysql> show vitess_migrations like 'c26f3b5e_6b50_11ee_808b_0a43f95f28a3' \G
2. *************************** 1. row ***************************
3. id: 1
4. migration_uuid: c26f3b5e_6b50_11ee_808b_0a43f95f28a3
5. keyspace: commerce
6. shard: 0
7. mysql_schema: vt_commerce
8. mysql_table: product
9. migration_statement: alter table product add column ts_entry TIMESTAMP not null
10. strategy: vitess
11. options:
12. added_timestamp: 2023-10-15 11:48:29
13. requested_timestamp: 2023-10-15 11:48:30
14. ready_timestamp: NULL
15. started_timestamp: 2023-10-15 11:48:31
16. liveness_timestamp: 2023-10-15 11:48:37
17. completed_timestamp: 2023-10-15 11:48:38.232430
18. cleanup_timestamp: NULL
19. migration_status: complete
20. log_path:
21. artifacts: _c26f3b5e_6b50_11ee_808b_0a43f95f28a3_20231015114830_vrepl,
22. retries: 0
23. tablet: zone1-0000000100
24. tablet_failure: 0
25. progress: 100
26. migration_context: vtctl:c26e658d-6b50-11ee-808b-0a43f95f28a3
27. ddl_action: alter
28. message:
29. eta_seconds: 0
30. rows_copied: 0
31. table_rows: 0
32. added_unique_keys: 0
33. removed_unique_keys: 0
34. log_file:
35. retain_artifacts_seconds: 86400
36. postpone_completion: 0
37. removed_unique_key_names:
38. dropped_no_default_column_names:
39. expanded_column_names:
40. revertible_notes:
41. allow_concurrent: 0
42. reverted_uuid:
43. is_view: 0
44. ready_to_complete: 1
45. vitess_liveness_indicator: 1697370514
46. user_throttle_ratio: 0
47. special_plan:
48. last_throttled_timestamp: NULL
49. component_throttled:
50. cancelled_timestamp: NULL
51. postpone_launch: 0
52. stage: re-enabling writes
53. cutover_attempts: 1
54. is_immediate_operation: 0
55. reviewed_timestamp: 2023-10-15 11:48:31
56. ready_to_complete_timestamp: 2023-10-15 11:48:35
1. mysql> show vitess_migrations like 'complete' \G
2. -- same output as above

4. mysql> show vitess_migrations like 'failed' \G
5. Empty set (0.01 sec)

Examples for a multi sharded cluster:

1. $ mysql customer
1. mysql> show vitess_migrations like 'complete';
2. +----+--------------------------------------+----------+-------+--------------+------------------+---------------------------------------------------------------------+----------+---------+---------------------+---------------------+-----------------+---------------------+---------------------+----------------------------+-------------------+------------------+----------+-------------------------------------------------------------+---------+------------------+----------------+----------+--------------------------------------------+------------+---------+-------------+-------------+------------+-------------------+---------------------+----------+--------------------------+---------------------+--------------------------+---------------------------------+-----------------------+-------------------------------------------+------------------+---------------+---------+-------------------+---------------------------+---------------------+--------------+--------------------------+---------------------+---------------------+-----------------+--------------------+------------------+------------------------+---------------------+-----------------------------+
3. | id | migration_uuid                       | keyspace | shard | mysql_schema | mysql_table      | migration_statement                                                 | strategy | options | added_timestamp     | requested_timestamp | ready_timestamp | started_timestamp   | liveness_timestamp  | completed_timestamp        | cleanup_timestamp | migration_status | log_path | artifacts                                                   | retries | tablet           | tablet_failure | progress | migration_context                          | ddl_action | message | eta_seconds | rows_copied | table_rows | added_unique_keys | removed_unique_keys | log_file | retain_artifacts_seconds | postpone_completion | removed_unique_key_names | dropped_no_default_column_names | expanded_column_names | revertible_notes                          | allow_concurrent | reverted_uuid | is_view | ready_to_complete | vitess_liveness_indicator | user_throttle_ratio | special_plan | last_throttled_timestamp | component_throttled | cancelled_timestamp | postpone_launch | stage              | cutover_attempts | is_immediate_operation | reviewed_timestamp  | ready_to_complete_timestamp |
4. +----+--------------------------------------+----------+-------+--------------+------------------+---------------------------------------------------------------------+----------+---------+---------------------+---------------------+-----------------+---------------------+---------------------+----------------------------+-------------------+------------------+----------+-------------------------------------------------------------+---------+------------------+----------------+----------+--------------------------------------------+------------+---------+-------------+-------------+------------+-------------------+---------------------+----------+--------------------------+---------------------+--------------------------+---------------------------------+-----------------------+-------------------------------------------+------------------+---------------+---------+-------------------+---------------------------+---------------------+--------------+--------------------------+---------------------+---------------------+-----------------+--------------------+------------------+------------------------+---------------------+-----------------------------+
5. |  7 | d729b47e_6b52_11ee_808b_0a43f95f28a3 | customer | 80-   | vt_customer  | corder           | alter table corder modify column price bigint unsigned default null | vitess   |         | 2023-10-15 12:03:23 | 2023-10-15 12:03:24 | NULL            | 2023-10-15 12:03:25 | 2023-10-15 12:03:31 | 2023-10-15 12:03:32.012778 | NULL              | complete         |          | _d729b47e_6b52_11ee_808b_0a43f95f28a3_20231015120324_vrepl, |       0 | zone1-0000000401 |              0 |      100 | vtctl:d7288b41-6b52-11ee-808b-0a43f95f28a3 | alter      |         |           0 |           0 |          0 |                 0 |                   0 |          |                    86400 |                   0 |                          |                                 | `price`               | column price: increased NUMERIC_PRECISION |                0 |               |       0 |                 1 |                1697371408 |                   0 |              | NULL                     |                     | NULL                |               0 | re-enabling writes |                1 |                      0 | 2023-10-15 12:03:25 | 2023-10-15 12:03:29         |
6. |  8 | d72b644f_6b52_11ee_808b_0a43f95f28a3 | customer | 80-   | vt_customer  | sample           | create table sample (
7. id int primary key
8. )                         | vitess   |         | 2023-10-15 12:03:23 | 2023-10-15 12:03:24 | NULL            | 2023-10-15 12:03:34 | 2023-10-15 12:03:34 | 2023-10-15 12:03:33.701212 | NULL              | complete         |          | _vt_HOLD_dd2164646b5211eeba7c0a43f95f28a3_20231016120333,   |       0 | zone1-0000000401 |              0 |      100 | vtctl:d7288b41-6b52-11ee-808b-0a43f95f28a3 | create     |         |           0 |           0 |          0 |                 0 |                   0 |          |                    86400 |                   0 |                          |                                 |                       |                                           |                0 |               |       0 |                 1 |                         0 |                   0 |              | NULL                     |                     | NULL                |               0 |                    |                0 |                      1 | 2023-10-15 12:03:25 | 2023-10-15 12:03:25         |
9. |  9 | d72d230d_6b52_11ee_808b_0a43f95f28a3 | customer | 80-   | vt_customer  | some_other_table | drop table if exists some_other_table                               | vitess   |         | 2023-10-15 12:03:23 | 2023-10-15 12:03:24 | NULL            | 2023-10-15 12:03:35 | 2023-10-15 12:03:35 | 2023-10-15 12:03:34.710144 | NULL              | complete         |          |                                                             |       0 | zone1-0000000401 |              0 |      100 | vtctl:d7288b41-6b52-11ee-808b-0a43f95f28a3 | drop       |         |           0 |           0 |          0 |                 0 |                   0 |          |                    86400 |                   0 |                          |                                 |                       |                                           |                0 |               |       0 |                 1 |                         0 |                   0 |              | NULL                     |                     | NULL                |               0 |                    |                0 |                      1 | 2023-10-15 12:03:25 | 2023-10-15 12:03:25         |
10. |  7 | d729b47e_6b52_11ee_808b_0a43f95f28a3 | customer | -80   | vt_customer  | corder           | alter table corder modify column price bigint unsigned default null | vitess   |         | 2023-10-15 12:03:23 | 2023-10-15 12:03:24 | NULL            | 2023-10-15 12:03:25 | 2023-10-15 12:03:31 | 2023-10-15 12:03:32.034889 | NULL              | complete         |          | _d729b47e_6b52_11ee_808b_0a43f95f28a3_20231015120324_vrepl, |       0 | zone1-0000000301 |              0 |      100 | vtctl:d7288b41-6b52-11ee-808b-0a43f95f28a3 | alter      |         |           0 |           0 |          0 |                 0 |                   0 |          |                    86400 |                   0 |                          |                                 | `price`               | column price: increased NUMERIC_PRECISION |                0 |               |       0 |                 1 |                1697371408 |                   0 |              | NULL                     |                     | NULL                |               0 | re-enabling writes |                1 |                      0 | 2023-10-15 12:03:25 | 2023-10-15 12:03:29         |
11. |  8 | d72b644f_6b52_11ee_808b_0a43f95f28a3 | customer | -80   | vt_customer  | sample           | create table sample (
12. id int primary key
13. )                         | vitess   |         | 2023-10-15 12:03:23 | 2023-10-15 12:03:24 | NULL            | 2023-10-15 12:03:34 | 2023-10-15 12:03:34 | 2023-10-15 12:03:33.701214 | NULL              | complete         |          | _vt_HOLD_dd21768e6b5211ee86cc0a43f95f28a3_20231016120333,   |       0 | zone1-0000000301 |              0 |      100 | vtctl:d7288b41-6b52-11ee-808b-0a43f95f28a3 | create     |         |           0 |           0 |          0 |                 0 |                   0 |          |                    86400 |                   0 |                          |                                 |                       |                                           |                0 |               |       0 |                 1 |                         0 |                   0 |              | NULL                     |                     | NULL                |               0 |                    |                0 |                      1 | 2023-10-15 12:03:25 | 2023-10-15 12:03:25         |
14. |  9 | d72d230d_6b52_11ee_808b_0a43f95f28a3 | customer | -80   | vt_customer  | some_other_table | drop table if exists some_other_table                               | vitess   |         | 2023-10-15 12:03:23 | 2023-10-15 12:03:24 | NULL            | 2023-10-15 12:03:35 | 2023-10-15 12:03:35 | 2023-10-15 12:03:34.710280 | NULL              | complete         |          |                                                             |       0 | zone1-0000000301 |              0 |      100 | vtctl:d7288b41-6b52-11ee-808b-0a43f95f28a3 | drop       |         |           0 |           0 |          0 |                 0 |                   0 |          |                    86400 |                   0 |                          |                                 |                       |                                           |                0 |               |       0 |                 1 |                         0 |                   0 |              | NULL                     |                     | NULL                |               0 |                    |                0 |                      1 | 2023-10-15 12:03:25 | 2023-10-15 12:03:25         |
15. +----+--------------------------------------+----------+-------+--------------+------------------+---------------------------------------------------------------------+----------+---------+---------------------+---------------------+-----------------+---------------------+---------------------+----------------------------+-------------------+------------------+----------+-------------------------------------------------------------+---------+------------------+----------------+----------+--------------------------------------------+------------+---------+-------------+-------------+------------+-------------------+---------------------+----------+--------------------------+---------------------+--------------------------+---------------------------------+-----------------------+-------------------------------------------+------------------+---------------+---------+-------------------+---------------------------+---------------------+--------------+--------------------------+---------------------+---------------------+-----------------+--------------------+------------------+------------------------+---------------------+-----------------------------+
1. $ vtctldclient OnlineDDL show customer cancelled --limit 1
2. +--------------------------------------+----------+-------+--------------+-------------+--------------------------------+----------+---------+---------------------+---------------------+-----------------+-------------------+--------------------+---------------------+-------------------+-----------+----------+-----------+---------+------------------+----------------+----------+--------------------------------------------+------------+---------------------------+-------------+-------------+------------+-------------------+---------------------+----------+----------------------------+---------------------+--------------------------+---------------------------------+-----------------------+------------------+------------------+---------------+---------+-------------------+---------------------------+---------------------+--------------+--------------------------+---------------------+---------------------+-----------------+-------+------------------+------------------------+--------------------+-----------------------------+
3. |            migration_uuid            | keyspace | shard | mysql_schema | mysql_table |      migration_statement       | strategy | options |   added_timestamp   | requested_timestamp | ready_timestamp | started_timestamp | liveness_timestamp | completed_timestamp | cleanup_timestamp |  status   | log_path | artifacts | retries |      tablet      | tablet_failure | progress |             migration_context              | ddl_action |          message          | eta_seconds | rows_copied | table_rows | added_unique_keys | removed_unique_keys | log_file | artifact_retention_seconds | postpone_completion | removed_unique_key_names | dropped_no_default_column_names | expanded_column_names | revertible_notes | allow_concurrent | reverted_uuid | is_view | ready_to_complete | vitess_liveness_indicator | user_throttle_ratio | special_plan | last_throttled_timestamp | component_throttled | cancelled_timestamp | postpone_launch | stage | cutover_attempts | is_immediate_operation | reviewed_timestamp | ready_to_complete_timestamp |
4. +--------------------------------------+----------+-------+--------------+-------------+--------------------------------+----------+---------+---------------------+---------------------+-----------------+-------------------+--------------------+---------------------+-------------------+-----------+----------+-----------+---------+------------------+----------------+----------+--------------------------------------------+------------+---------------------------+-------------+-------------+------------+-------------------+---------------------+----------+----------------------------+---------------------+--------------------------+---------------------------------+-----------------------+------------------+------------------+---------------+---------+-------------------+---------------------------+---------------------+--------------+--------------------------+---------------------+---------------------+-----------------+-------+------------------+------------------------+--------------------+-----------------------------+
5. | c919678a_6b50_11ee_808b_0a43f95f28a3 | customer |   -80 | vt_customer  | product     | alter table product modify     | vitess   |         | 2023-10-15 11:48:41 | 2023-10-15 11:48:41 |                 |                   |                    | 2023-10-15 12:00:26 |                   | cancelled |          |           |       0 | zone1-0000000301 |                |        0 | vtctl:c91857d2-6b50-11ee-808b-0a43f95f28a3 | alter      | CANCEL ALL issued by user |          -1 |           0 |          0 |                 0 |                   0 |          |                      86400 |                     |                          |                                 |                       |                  |                  |               |         |                   |                         0 |                   0 |              |                          |                     |                     |                 |       |                0 |                        |                    |                             |
6. |                                      |          |       |              |             | column price bigint unsigned   |          |         |                     |                     |                 |                   |                    |                     |                   |           |          |           |         |                  |                |          |                                            |            |                           |             |             |            |                   |                     |          |                            |                     |                          |                                 |                       |                  |                  |               |         |                   |                           |                     |              |                          |                     |                     |                 |       |                  |                        |                    |                             |
7. |                                      |          |       |              |             | default null                   |          |         |                     |                     |                 |                   |                    |                     |                   |           |          |           |         |                  |                |          |                                            |            |                           |             |             |            |                   |                     |          |                            |                     |                          |                                 |                       |                  |                  |               |         |                   |                           |                     |              |                          |                     |                     |                 |       |                  |                        |                    |                             |
8. | c919678a_6b50_11ee_808b_0a43f95f28a3 | customer | 80-   | vt_customer  | product     | alter table product modify     | vitess   |         | 2023-10-15 11:48:41 | 2023-10-15 11:48:41 |                 |                   |                    | 2023-10-15 12:00:26 |                   | cancelled |          |           |       0 | zone1-0000000401 |                |        0 | vtctl:c91857d2-6b50-11ee-808b-0a43f95f28a3 | alter      | CANCEL ALL issued by user |          -1 |           0 |          0 |                 0 |                   0 |          |                      86400 |                     |                          |                                 |                       |                  |                  |               |         |                   |                         0 |                   0 |              |                          |                     |                     |                 |       |                0 |                        |                    |                             |
9. |                                      |          |       |              |             | column price bigint unsigned   |          |         |                     |                     |                 |                   |                    |                     |                   |           |          |           |         |                  |                |          |                                            |            |                           |             |             |            |                   |                     |          |                            |                     |                          |                                 |                       |                  |                  |               |         |                   |                           |                     |              |                          |                     |                     |                 |       |                  |                        |                    |                             |
10. |                                      |          |       |              |             | default null                   |          |         |                     |                     |                 |                   |                    |                     |                   |           |          |           |         |                  |                |          |                                            |            |                           |             |             |            |                   |                     |          |                            |                     |                          |                                 |                       |                  |                  |               |         |                   |                           |                     |              |                          |                     |                     |                 |       |                  |                        |                    |                             |
11. +--------------------------------------+----------+-------+--------------+-------------+--------------------------------+----------+---------+---------------------+---------------------+-----------------+-------------------+--------------------+---------------------+-------------------+-----------+----------+-----------+---------+------------------+----------------+----------+--------------------------------------------+------------+---------------------------+-------------+-------------+------------+-------------------+---------------------+----------+----------------------------+---------------------+--------------------------+---------------------------------+-----------------------+------------------+------------------+---------------+---------+-------------------+---------------------------+---------------------+--------------+--------------------------+---------------------+---------------------+-----------------+-------+------------------+------------------------+--------------------+-----------------------------+

Note in the above each migration appears twice. For example, d729b47e_6b52_11ee_808b_0a43f95f28a3 appears once for shard -80 and once for shard 80-. The two migrations run independently on each shard. It is possible to coordinate a near-atomic cut-over, aka gated cut-over.

  • show vitess_migrations shows the entire history of migrations.
  • show vitess_migrations like ... filters migrations by migration_uuid, or migration_context, or migration_status.
  • show vitess_migrations where ... lets the user specify arbitrary conditions.
  • All commands return results for the keyspace (schema) in use.

Via vtctldclient

`` 1. $ vtctldclient OnlineDDL show customer d729b47e_6b52_11ee_808b_0a43f95f28a3 2. +--------------------------------------+----------+-------+--------------+-------------+--------------------------------+----------+---------+---------------------+---------------------+-----------------+---------------------+---------------------+---------------------+-------------------+----------+----------+-------------------------------------------------------------+---------+------------------+----------------+----------+--------------------------------------------+------------+---------+-------------+-------------+------------+-------------------+---------------------+----------+----------------------------+---------------------+--------------------------+---------------------------------+-----------------------+--------------------------------+------------------+---------------+---------+-------------------+---------------------------+---------------------+--------------+--------------------------+---------------------+---------------------+-----------------+--------------------+------------------+------------------------+---------------------+-----------------------------+ 3. | migration_uuid | keyspace | shard | mysql_schema | mysql_table | migration_statement | strategy | options | added_timestamp | requested_timestamp | ready_timestamp | started_timestamp | liveness_timestamp | completed_timestamp | cleanup_timestamp | status | log_path | artifacts | retries | tablet | tablet_failure | progress | migration_context | ddl_action | message | eta_seconds | rows_copied | table_rows | added_unique_keys | removed_unique_keys | log_file | artifact_retention_seconds | postpone_completion | removed_unique_key_names | dropped_no_default_column_names | expanded_column_names | revertible_notes | allow_concurrent | reverted_uuid | is_view | ready_to_complete | vitess_liveness_indicator | user_throttle_ratio | special_plan | last_throttled_timestamp | component_throttled | cancelled_timestamp | postpone_launch | stage | cutover_attempts | is_immediate_operation | reviewed_timestamp | ready_to_complete_timestamp | 4. +--------------------------------------+----------+-------+--------------+-------------+--------------------------------+----------+---------+---------------------+---------------------+-----------------+---------------------+---------------------+---------------------+-------------------+----------+----------+-------------------------------------------------------------+---------+------------------+----------------+----------+--------------------------------------------+------------+---------+-------------+-------------+------------+-------------------+---------------------+----------+----------------------------+---------------------+--------------------------+---------------------------------+-----------------------+--------------------------------+------------------+---------------+---------+-------------------+---------------------------+---------------------+--------------+--------------------------+---------------------+---------------------+-----------------+--------------------+------------------+------------------------+---------------------+-----------------------------+ 5. | d729b47e_6b52_11ee_808b_0a43f95f28a3 | customer | 80- | vt_customer | corder | alter table corder modify | vitess | | 2023-10-15 12:03:23 | 2023-10-15 12:03:24 | | 2023-10-15 12:03:25 | 2023-10-15 12:03:31 | 2023-10-15 12:03:32 | | complete | | _d729b47e_6b52_11ee_808b_0a43f95f28a3_20231015120324_vrepl, | 0 | zone1-0000000401 | | 100 | vtctl:d7288b41-6b52-11ee-808b-0a43f95f28a3 | alter | | 0 | 0 | 0 | 0 | 0 | | 86400 | | | |price| column price: increased | | | | | 1697371408 | 0 | | | | | | re-enabling writes | 1 | | 2023-10-15 12:03:25 | 2023-10-15 12:03:29 | 6. | | | | | | column price bigint unsigned | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NUMERIC_PRECISION | | | | | | | | | | | | | | | | | 7. | | | | | | default null | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8. | d729b47e_6b52_11ee_808b_0a43f95f28a3 | customer | -80 | vt_customer | corder | alter table corder modify | vitess | | 2023-10-15 12:03:23 | 2023-10-15 12:03:24 | | 2023-10-15 12:03:25 | 2023-10-15 12:03:31 | 2023-10-15 12:03:32 | | complete | | _d729b47e_6b52_11ee_808b_0a43f95f28a3_20231015120324_vrepl, | 0 | zone1-0000000301 | | 100 | vtctl:d7288b41-6b52-11ee-808b-0a43f95f28a3 | alter | | 0 | 0 | 0 | 0 | 0 | | 86400 | | | |price` | column price: increased | | | | | 1697371408 | 0 | | | | | | re-enabling writes | 1 | | 2023-10-15 12:03:25 | 2023-10-15 12:03:29 | 9. | | | | | | column price bigint unsigned | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NUMERIC_PRECISION | | | | | | | | | | | | | | | | | 10. | | | | | | default null | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 11. +--------------------------------------+----------+-------+--------------+-------------+--------------------------------+----------+---------+---------------------+---------------------+-----------------+---------------------+---------------------+---------------------+-------------------+----------+----------+-------------------------------------------------------------+---------+------------------+----------------+----------+--------------------------------------------+------------+---------+-------------+-------------+------------+-------------------+---------------------+----------+----------------------------+---------------------+--------------------------+---------------------------------+-----------------------+--------------------------------+------------------+---------------+---------+-------------------+---------------------------+---------------------+--------------+--------------------------+---------------------+---------------------+-----------------+--------------------+------------------+------------------------+---------------------+-----------------------------+

  1. $ vtctldclient OnlineDDL show commerce recent
  2. +--------------------------------------+----------+-------+--------------+-------------+--------------------------------+----------+---------+---------------------+---------------------+-----------------+---------------------+---------------------+---------------------+-------------------+----------+----------+-------------------------------------------------------------+---------+------------------+----------------+----------+--------------------------------------------+------------+---------+-------------+-------------+------------+-------------------+---------------------+----------+----------------------------+---------------------+--------------------------+---------------------------------+-----------------------+------------------+------------------+---------------+---------+-------------------+---------------------------+---------------------+--------------+--------------------------+---------------------+---------------------+-----------------+--------------------+------------------+------------------------+---------------------+-----------------------------+
  3. | migration_uuid | keyspace | shard | mysql_schema | mysql_table | migration_statement | strategy | options | added_timestamp | requested_timestamp | ready_timestamp | started_timestamp | liveness_timestamp | completed_timestamp | cleanup_timestamp | status | log_path | artifacts | retries | tablet | tablet_failure | progress | migration_context | ddl_action | message | eta_seconds | rows_copied | table_rows | added_unique_keys | removed_unique_keys | log_file | artifact_retention_seconds | postpone_completion | removed_unique_key_names | dropped_no_default_column_names | expanded_column_names | revertible_notes | allow_concurrent | reverted_uuid | is_view | ready_to_complete | vitess_liveness_indicator | user_throttle_ratio | special_plan | last_throttled_timestamp | component_throttled | cancelled_timestamp | postpone_launch | stage | cutover_attempts | is_immediate_operation | reviewed_timestamp | ready_to_complete_timestamp |
  4. +--------------------------------------+----------+-------+--------------+-------------+--------------------------------+----------+---------+---------------------+---------------------+-----------------+---------------------+---------------------+---------------------+-------------------+----------+----------+-------------------------------------------------------------+---------+------------------+----------------+----------+--------------------------------------------+------------+---------+-------------+-------------+------------+-------------------+---------------------+----------+----------------------------+---------------------+--------------------------+---------------------------------+-----------------------+------------------+------------------+---------------+---------+-------------------+---------------------------+---------------------+--------------+--------------------------+---------------------+---------------------+-----------------+--------------------+------------------+------------------------+---------------------+-----------------------------+
  5. | c26f3b5e_6b50_11ee_808b_0a43f95f28a3 | commerce | 0 | vt_commerce | product | alter table product add column | vitess | | 2023-10-15 11:48:29 | 2023-10-15 11:48:30 | | 2023-10-15 11:48:31 | 2023-10-15 11:48:37 | 2023-10-15 11:48:38 | | complete | | _c26f3b5e_6b50_11ee_808b_0a43f95f28a3_20231015114830_vrepl, |

(本文超出站点单文档体积上限,已截断)