Skip to content

Commit 964a9a4

Browse files
authored
Update alter_foreign_key.go
1 parent 9cd0758 commit 964a9a4

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

sql/plan/alter_foreign_key.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -653,11 +653,6 @@ func foreignKeyComparableTypes(ctx *sql.Context, type1 sql.Type, type2 sql.Type)
653653

654654
// Handle time-related types with different precisions or cross-type references
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)