Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fix: EXPOSED-415 SchemaUtils incorrectly generates ALTER statements f… #2136
fix: EXPOSED-415 SchemaUtils incorrectly generates ALTER statements f… #2136
Changes from 1 commit
ecc8a94
a363d9f
fd7ae29
dba3d98
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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'm not sure if we have good enough test coverage to ok removing some of these branches. The h2Modes are probably not going to be an issue, but removing MariaDB from this substring check may cause problems in a few users.
One example I can think of:
In both MySQL and MariaDB, Exposed takes the opinion to store boolean values in
BOOLEAN
column type instead ofBIT
. But let's say a user has an existing table already in the DB that usesBIT
(or chooses to create one themselves), and they are using their own custombool()
to register and work with thisBIT
column using Kotlin booleans.Attempting something like the following would no longer show the same behavior in both DB:
I'd suggest a third branch (if value starts with
b'
or something) in the new MariaDB logic that does what the original logic did (i.e. what the new MySQL branch does now). Not sure if the mysql H2 modes would also be affected.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.
Added check of
'b
for MariaDB also, but without proper test actually.But what I've found during testing of this is that
binary
column is almost untested and quite broken.I added test to check binary column ddl generation, and insert/reading values (with binary literal also, and the binary literal actually). So now it looks better, but PR become a bit bigger..