Last active
October 30, 2017 03:00
-
-
Save gzxultra/762507f40fb3ac7d99fcf3f9d43ecaf3 to your computer and use it in GitHub Desktop.
examples for pt-online-schema-change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```shell | |
pt-online-schema-change \ | |
--execute \ | |
--no-check-alter \ | |
--ask-pass \ | |
--recursion-method none \ | |
--set-vars lock_wait_timeout=3 \ | |
--alter "change serial_code warehouse_code varchar(100) not null default ''" \ | |
u=xcf,h=xcfapp-mysql,D=xcf_mfarm,t=fresh_warehouse | |
pt-online-schema-change \ | |
--execute \ | |
--no-check-alter \ | |
--ask-pass \ | |
--recursion-method none \ | |
--set-vars lock_wait_timeout=3 \ | |
--alter "add column url varchar(100) not null default ''" \ | |
u=xcf,h=devdb,D=xcf_mfarm,t=explore_tab | |
pt-online-schema-change \ | |
--execute \ | |
--no-check-alter \ | |
--ask-pass \ | |
--recursion-method none \ | |
--set-vars lock_wait_timeout=3 \ | |
--alter "add column data_json blob" \ | |
u=xcf,h=devdb,D=xcf_mfarm,t=fresh_warehouse | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment