-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Make access column a real boolean #15259
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d80a082 to
0249f95
Compare
|
Looks like this is a winner, yes? (drone failure seems to be due to a cancelled build) |
nickvergessen
approved these changes
Apr 29, 2019
On pqsql true/false is no valid value for an integer column. Signed-off-by: Daniel Kesselberg <[email protected]>
Signed-off-by: Daniel Kesselberg <[email protected]>
Signed-off-by: Daniel Kesselberg <[email protected]>
Signed-off-by: Daniel Kesselberg <[email protected]>
Signed-off-by: Daniel Kesselberg <[email protected]>
Signed-off-by: Daniel Kesselberg <[email protected]>
1f72d5e to
ef3725e
Compare
|
Ping? 😇 |
Merged
MorrisJobke
approved these changes
May 7, 2019
Member
MorrisJobke
left a comment
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.
Tested and works 👍
Member
|
/backport to stable16 |
|
backport to stable16 in #15434 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Close #15256
Type::SMALLINTshould beType::BOOLEAN.MySQL uses a tinyint(1) to store a boolean value where PostgresSql has a dedicated type boolean for booleans. If we create a column with type smallint and try to save a boolean postgresql 💥
https://github.com/doctrine/dbal/blob/e4978c2299d4d8e4f39da94f4d567e698e9bdbeb/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php#L944
https://github.com/doctrine/dbal/blob/e4978c2299d4d8e4f39da94f4d567e698e9bdbeb/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php#L299
Tested these changes only on mysql (smallint to tinyint there). Tried multiple ways to do it with one migration but doctrine is smart enough to merge dropColumn and addColumn to changeColumn which fails on pqsql because for a integer to boolean conversion we need additional instructions for pqsql which is not supported by doctrine yet (e.g. https://drone.nextcloud.com/nextcloud/server/18043/21/5)