Online DDL: switch unique key and column logic to declarative schemadiff
analysis
#16229
Labels
Component: Online DDL
Online DDL (vitess/native/gh-ost/pt-osc)
Type: Enhancement
Logical improvement (somewhere between a bug and feature)
vitess
migrations require some analysis on participating columns (type, nullability, etc.) and of the table's unique keys (fiding an appropriate iteration key for the migration).That analysis takes place today via
information_schema
:vitess/go/vt/vttablet/onlineddl/schema.go
Lines 456 to 465 in 1cc3e14
vitess/go/vt/vttablet/onlineddl/schema.go
Lines 482 to 545 in 1cc3e14
vitess/go/vt/vttablet/onlineddl/schema.go
Line 550 in 1cc3e14
vitess/go/vt/vttablet/onlineddl/schema.go
Lines 558 to 566 in 1cc3e14
We want to move away from
information_schema
based analysis and into programmatic and declarativeschemadiff
analysis. We already askschemadiff
for instant-ddl capabilities and we generally want it to own as much of schema analysis as possible.At the resolution of this issue,
schemadiff
should be able to tell, given two before and after tables, which unique keys ar ebest to use as iteration keys (if any) and what specific details we should know about the columns.The text was updated successfully, but these errors were encountered: