Uh oh!
There was an error while loading. Please reload this page.
Reverted commit 54a5f938f99 because of Bug #23174 - #23507
Conversation
nickvergessen
commented
Oct 16, 2020
Yes need to fix flow instead @blizzz |
@nickvergessen@blizzz I've reverted the revert and fixed the migration instead. Since I assume that the column 'entity' should never become Null when added, I've changed 'notnull' to FALSE instead of removing the empty default value. Is this a valid fix for the problem? A comment on the original test: would it not be better to differentiate between NotNull and NotBlank? |
nickvergessen
commented
Oct 16, 2020
Well empty strings are saved as Null in Oracle, so having an NotNull with default |
Cybso
commented
Oct 16, 2020
Well, that's bad. While MariaDB obviously accepts adding "not null" columns without explicit default, SQLite does not: Mariadb: SQLite: |
Cybso
commented
Oct 19, 2020
@blizzz I'm still not very familiar with the extended git features. I've used "git rebase -i HEAD~2" to squash the second commit with the first one, but when I try to push this to Github, I get the following error: Can you give me I hint how to fix this? |
ChristophWurst
commented
Oct 19, 2020
You need |
2fd97ac to
2a376d4Compare| if(!$table->hasColumn('entity')) { | ||
| $table->addColumn('entity', Type::STRING, [ | ||
| 'notnull' => true, | ||
| 'notnull' => false, |
There was a problem hiding this comment.
We need a follow up migration which fixes existing instances?
There was a problem hiding this comment.
I think it would be nice to have matching database definition across all instances, but not exactly required. The module won't write any NULL values into this column, so at least for MySQL and SQLite it doesn't matter if it's true or false (cannot speak for Oracle). An alternative implementation would be to add a second call which updates the database definition to "NotNull = true" and removes the default value after the table has been extended.
@blizzz, what's your opinion?
There was a problem hiding this comment.
Consistency and an expected state is to be preferred, otherwise we indeed may run into trouble in future changes. So, yes, a migration step would be ideal to add.
There was a problem hiding this comment.
Sorry, I've tried, but at the moment I do not find the time to implement this second migration. Can someone take over?
nickvergessen
commented
Nov 16, 2020
Done in #23882 |
Reverted commit 54a5f93 from @nickvergessen to fix bug #23174 which breaks upgrades to 18.0.10.
Maybe it would be better to fix the migration of oc_flow_operations instead, but I'm not familiar with this part of the code.
fix#23174