ALTER TABLE `test`.`user`
ADD COLUMN `xxx` VARCHAR(45) NULL AFTER `address`;
추가하면.
history topic에는 다음이 추가된다.
{
“source” : {
“server” : “test”
},
“position” : {
“ts_sec” : 1554888803,
“file” : “mysql-bin.000022”,
“pos” : 38264335,
“gtids” : “9a227629-491c-11e9-ae9d-fa163ea8d9a7:1-1656775,b0be07a9-491c-11e9-ae12-fa163ec49735:1-13745",
“server_id” : 1944318
},
“databaseName” : “”,
“ddl” : “ALTER TABLE `test`.`user` \nADD COLUMN `xxx` VARCHAR(45) NULL AFTER `address`”
}
— 다음과 같이 수행하면..
ALTER TABLE `test`.`user`
DROP COLUMN `xxx`;
history topic에 다음이 전달된다.
{
“source” : {
“server” : “test”
},
“position” : {
“ts_sec” : 1554888844,
“file” : “mysql-bin.000022”,
“pos” : 38264514,
“gtids” : “9a227629-491c-11e9-ae9d-fa163ea8d9a7:1-1656776,b0be07a9-491c-11e9-ae12-fa163ec49735:1-13745",
“server_id” : 1944318
},
“databaseName” : “”,
“ddl” : “ALTER TABLE `test`.`user` \nDROP COLUMN `xxx`”
}