@barbushin opened this Pull Request on July 14th 2015 Contributor
@mnapoli commented on July 20th 2015 Member

:+1: looks good! Question for others: are there any tests of those migrations? Letting another pair of eyes review this just to be sure.

@tsteur commented on July 21st 2015 Owner

There should be a UI test that performs an update but I'm not sure if it would notice if an update is skipped

@mattab commented on July 22nd 2015 Owner

There should be a UI test that performs an update but I'm not sure if it would notice if an update is skipped

the UI test that performns Update is: https://github.com/piwik/piwik/blob/master/tests/UI/specs/CoreUpdaterDb_spec.js#L9-8
it uses this fixture: https://github.com/piwik/piwik/blob/master/plugins/CoreUpdater/Test/Fixtures/DbUpdaterTestFixture.php#L18-18
which uses Piwik 1.0 and runs the upgrade all the way to master (dozens of versions).

However this test will only detect broken updates, it will not detect "missing updates".

To be sure this PR works well, we could run the upgrade from 1.0 version, dump the schema, and check it is the same as the schema from a fresh 2.14.1 ?

@diosmosis commented on August 21st 2015 Member

Tested as @mattab suggested, and there appears to be no regression. I did notice one thing, when updating from 1.0 to 2.14.1-b1 (the version the PR is based on), the type column in piwik_site was:

`type` varchar(255) NOT NULL DEFAULT 'website'

When installing a clean 2.14.1-b1, the type column is:

`type` varchar(255) NOT NULL

I don't think this has anything to do w/ this PR, but @tsteur may be interested in this.

Will merge after some tweaks.

This Pull Request was closed on August 21st 2015
Powered by GitHub Issue Mirror