Skip to content

Commit f43deba

Browse files
authored
Update alter_foreign_key.go rm redundant comment
1 parent f2dbc43 commit f43deba

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

sql/plan/alter_foreign_key.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -651,13 +651,8 @@ func foreignKeyComparableTypes(ctx *sql.Context, type1 sql.Type, type2 sql.Type)
651651
t1 := type1.Type()
652652
t2 := type2.Type()
653653

654-
// Handle time-related types with different precisions or cross-type references
654+
// MySQL allows time-related types to reference each other in foreign keys:
655655
if (types.IsTime(type1) || types.IsTimespan(type1)) && (types.IsTime(type2) || types.IsTimespan(type2)) {
656-
// MySQL allows time-related types to reference each other in foreign keys:
657-
// - DATETIME can reference DATETIME with different precision
658-
// - TIMESTAMP can reference TIMESTAMP with different precision
659-
// - DATETIME can reference TIMESTAMP and vice versa
660-
// - TIME can reference TIME with different precision
661656
return true
662657
}
663658

0 commit comments

Comments
 (0)