-
Notifications
You must be signed in to change notification settings - Fork 671
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
eliminate 2.3 to 3.x upgrade roadblocks #11131
Conversation
@@ -657,24 +657,18 @@ public static function upgrade() { | |||
* @return bool | |||
*/ | |||
public static function migrate() { | |||
try { |
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 am letting it throw here, otherwise it's hard to debug problems.
@@ -96,24 +96,6 @@ function set($name, $value) { | |||
':name' => $name, | |||
':value' => serialize($value), | |||
]; | |||
|
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.
Sync upgrades will always run after database migrations, so this is not needed anymore
/** | ||
* Removes site guid from legacy 2.x tables | ||
*/ | ||
public function change() { |
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 figure for most of these migrations downward migration will not be possible.
Maybe someone else can take a look. Things are working fine locally, so not sure what's up with Travis build. |
use Phinx\Db\Adapter\MysqlAdapter; | ||
use Phinx\Migration\AbstractMigration; | ||
|
||
class ChangeTableEngineAndEncoding extends AbstractMigration { |
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 really torn about requiring this to upgrade to 3.0, though a controlled process like this is the way.
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.
It will be such a painful manual process otherwise
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.
One other option is to rename all old tables by adding a prefix or suffix, creating new schema and then migrating all values from old tables. It might be a bit cleaner
This is the best I can do here. If tests fail, then someone will need to take over. |
@jdalsem Could you check this out and see if you can successfully upgrade from 2.3 and run database encoding async upgrade? |
All synchronous upgrade scripts have been removed. Scripts that were altering the database have been moved to phinx database migrations. Security settings defaults have been moved to async script to allow admins access upgrade.php during upgrade process. Async upgrade to convert database and table encoding to utf8 has been added. Database is now seeded before running upgrade tests on Travis. Async upgrades now run during upgrade tests on Travis.
@mrclay I am running out of patience with the encoding async upgrade. See if you can make it work. If it doesn't just remove it, the rest should be functional, and will fix issues with subtype migrations. |
Looks like it finally worked. Someone do a manual test and merge this idiot. |
https://travis-ci.org/Elgg/Elgg/jobs/262639154#L1180 should the title of the async upgrade be a readable thing? |
It should be, not sure why translations are not loaded. I am way passed the stage where I care. |
could you try to fix it? i am now doing the manual test |
I honestly don't care about translation strings at this point. I have spent way too much time on this. |
could do a follow up ticket for the translations |
Ok did a test:
Site operational... no other issues, so looks good |
anything else you would like to see tested? |
Nope, all good then |
chore(upgrade): eliminate 2.3 to 3.x upgrade roadblocks
All synchronous upgrade scripts have been removed.
Scripts that were altering the database have been moved to phinx database
migrations.
Security settings defaults have been moved to async script to allow
admins access upgrade.php during upgrade process.
Async upgrade to convert database and table encoding to utf8 has been
added.
Database is now seeded before running upgrade tests on Travis.
Async upgrades now run during upgrade tests on Travis.
chore(tests): seed the database before running upgrade tests