-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[yugabyte] SQL Migrations #1138
Conversation
dea4bff
to
0c4950d
Compare
0c4950d
to
dcf7215
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review of everything except SQL migrations: LGTM, only minor comments for clarity / control flow.
Question about the SQL migrations: Since with yugabyte DBs we will be starting from scratch anyway, we may have an opportunity here to simplify the definitions by consolidating them into a single migration. Have you considered that?
04323b6
to
5831bf8
Compare
@mickmis migrations have been flattened as per discussion during contributors sync. |
142d79d
to
5c7f3cd
Compare
5c7f3cd
to
743d428
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full review, LGTM, just minor comments/questions to address before merging.
Just to document my understanding of the reasoning behind "It was agreed to squash the migration to reflect rid v4.0.0 and scd v3.2.0 of the crdb schema.": We have no intent to support the ability to users to switch between database backends at any time, and we further expect any potential migration of data between database backends to be a one-time occurrence. Therefore, the process of switching to YugabyteDB from an earlier schema version simply includes the step of migrating to rid v4.0.0 and scd v3.2.0 as the first part of the process. YugabyteDB schemas will be on an entirely separate track from CRDB schemas and therefore there is no need to synchronize schema versions. Instead, any particular DSS release will have a minimum and maximum CRDB schema version supported (for the duration that CRDB is still supported) and a separate minimum and maximum YugabyteDB schema version supported. |
This PR adds migration scripts for yugabyte and adapts the migration CLI accordingly.
Migration
Yugabyte does not support the exact same data types and declaration syntax as CockroachDB, therefore the following adaptations have been made:
Data Types (CockroachDB -> Yugabyte):
Indexes:
Syntax required changes:
Additional notes
CI and Tests