We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f97a08 commit 1e4bbcbCopy full SHA for 1e4bbcb
go/base/context.go
@@ -872,12 +872,7 @@ func (this *MigrationContext) GetGhostTriggerName(triggerName string) string {
872
873
// validateGhostTriggerLength check if the ghost trigger name length is not more than 64 characters
874
func (this *MigrationContext) ValidateGhostTriggerLengthBelowMaxLength(triggerName string) bool {
875
- var ghostTriggerName string
876
- if this.RemoveTriggerSuffix {
877
- ghostTriggerName = strings.TrimSuffix(triggerName, this.TriggerSuffix)
878
- } else {
879
- ghostTriggerName = triggerName + this.TriggerSuffix
880
- }
+ ghostTriggerName := this.GetGhostTriggerName(triggerName)
881
882
return utf8.RuneCountInString(ghostTriggerName) <= mysql.MaxTableNameLength
883
}
0 commit comments