-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add missing migrations for longtext and indices #654
Conversation
Core PR to implement the same code from upstream: owncloud/core#33231. |
I guess it won't be possible to make Oracle comply without gymnastics similar to https://github.com/owncloud/activity/blob/master/appinfo/Migrations/Version20170131134507.php#L18 |
for the oracle part we could leave a release note and tell people what to do ... there are only a few installations ..... |
1 similar comment
for the oracle part we could leave a release note and tell people what to do ... there are only a few installations ..... |
@DeepDiver1975 in my local tests with core I noticed that Oracle would anyway convert the column to CLOB when asking for longtext. It looks like https://github.com/owncloud/activity/blob/master/appinfo/Migrations/Version20170131134507.php#L18 is already doing that. This means that we don't need to care about Oracle in activity for the longtext columns. |
had a chat with @DeepDiver1975 and due to the missing DBAL feature and also the fact that this kind of migration is seldom, we'll write a migration containing direct SQL statements instead, which removes the need for the core workaround PR. |
Seems PostgreSQL has no distinction between longtext and text, it's all "text" so we likely also do not need any change. |
4cea094
to
f0f8a00
Compare
updated with plain SQL statement for MySQL. I'll have a test with PostgreSQL just to make sure there aren't other discrepancies and to confirm that no SQL change is needed. |
I've checked with PostgreSQL and apparently the column is already "text" and has no limit:
so we only need to handle MySQL as already in the current PR code. |
Codecov Report
@@ Coverage Diff @@
## master #654 +/- ##
===========================================
- Coverage 86.57% 85.47% -1.1%
- Complexity 495 500 +5
===========================================
Files 36 38 +2
Lines 1788 1811 +23
===========================================
Hits 1548 1548
- Misses 240 263 +23
Continue to review full report at Codecov.
|
/** | ||
* @author Vincent Petry <pvince81@owncloud.com> | ||
* | ||
* @copyright Copyright (c) 2018, ownCloud, Inc. |
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.
GmbH
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 copy-pasted this file from another migration, so it's wrong there as well.
I'll adjust them all then
/** | ||
* @author Vincent Petry <pvince81@owncloud.com> | ||
* | ||
* @copyright Copyright (c) 2018, ownCloud, Inc. |
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.
GmbH
- set type to "longtext" for "subjectparams" and "messageparams" by increasing length - add index "activity_time" on column "timestamp" - add index "activity_object" on columns "object_type" and "object_id"
f0f8a00
to
6aafcbe
Compare
fixed license row |
Fixes #652
BUG: cannot change from text to longtext because Doctrine ignores length changes, possibly related unmerged upstream PR: Fix text column length change doctrine/dbal#3182, also see Column altering in migration from TEXT to LONGTEXT may not apply. doctrine/dbal#2566=> now resorting to direct SQL