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
dialect/sql/schema: file based type store #2644
Conversation
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.
Looks fantastic 💯
Hey, I'm getting |
Good catch. I will both add a test and a fix for that :-) |
This PR adds support for a file based type storage when using versioned migrations. The file called `.ent_types` is written to the migration directory alongside the migration files and will be kept in sync for every migration file generation run. In order to not break existing code, where the type storage might differ for different deployment, global unique ID mut be enabled by using a new option. This will also be raised as an error to the user when attempting to use versioned migrations and global unique ID. Documentation will be added to this PR once feedback on the code is gathered.
8eeb23c
to
3e8ea0a
Compare
Looks good 🚀 Please, fix the broken tests and I'll approve. |
dda6d53
to
d93b55d
Compare
Currently this PR is blocked on a checksum problem: cc @a8m |
1e93cfe
to
61b601f
Compare
7142c03
to
bef944e
Compare
bef944e
to
85f1948
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.
I like the code but can't see WithDeterministicGlobalUniqueID
. It's too long for me 🙈
This PR adds support for a file based type storage when using versioned migrations. The file called
.ent_types
is written to the migration directory alongside the migration files and will be kept in sync for every migration file generation run.In order to not break existing code, where the type storage might differ for different deployment, global unique ID mut be enabled by using a new option. This will also be raised as an error to the user when attempting to use versioned migrations and global unique ID.
Documentation will be added to this PR once feedback on the code is gathered.
Fixes #2587
I have discussed with Ariel already, that we will move the configuration for allocated pk ranges to the schema level. We haven't yet figured out, how to do this best, but it will come.