diff --git a/go/logic/applier.go b/go/logic/applier.go index ec0ee86..0fbf9f3 100644 --- a/go/logic/applier.go +++ b/go/logic/applier.go @@ -22,7 +22,8 @@ import ( ) const ( - atomicCutOverMagicHint = "ghost-cut-over-sentry" + GhostChangelogTableComment = "gh-ost changelog" + atomicCutOverMagicHint = "ghost-cut-over-sentry" ) type dmlBuildResult struct { @@ -232,16 +233,16 @@ func (this *Applier) CreateChangelogTable() error { return err } query := fmt.Sprintf(`create /* gh-ost */ table %s.%s ( - id bigint auto_increment, + id bigint unsigned auto_increment, last_update timestamp not null DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, hint varchar(64) charset ascii not null, value varchar(4096) charset ascii not null, primary key(id), unique key hint_uidx(hint) - ) auto_increment=256 - `, + ) auto_increment=256 comment='%s'`, sql.EscapeName(this.migrationContext.DatabaseName), sql.EscapeName(this.migrationContext.GetChangelogTableName()), + GhostChangelogTableComment, ) this.migrationContext.Log.Infof("Creating changelog table %s.%s", sql.EscapeName(this.migrationContext.DatabaseName),