MichalKleiner

if you need to merge some content, it’s a PITA. if you have upgraded code, but no SS4 content, drop the current upgraded db, put in the SS3 one and run the dev build on that

MichalKleiner

you’re importing the db as in merging it with the existing one?

Thor

Excuse me, I have met a problem while upgrading a site from SS3 to SS4.

I have followed the official guide from step 0 to 10 and the site is able to run after /dev/build?flush=1.

However, when I try to run /dev/build after importing the old database from SS3 site to the local SS4 database (MySQL 5.7), the system complains like this:

  1. [Emergency] Uncaught SilverStripe\ORM\Connect\DatabaseException: Couldn't run query: ALTER TABLE "__TEMP__SiteTree_Versions" RENAME "SiteTree_Versions" Table 'SiteTree_Versions' already exists

My solution is to drop all tables suffixed with "_Versions" and run /dev/build?flush=1 again. It works, but it might also mean that I lost all version information of existing DataObject.

Could anyone let me know whether there is a better solution?

nightjarnz

Also make sure that the web server (presumably apache) and the CLI are using the same version - check the browser vs php -v from the cli.

nightjarnz

@Beshad Shouldn't need to downgrade - I run 7.2.10 - it's just that although you've installed intl extension, it's probably still not enabled in the 7.2 config - see /etc/php/7.2/php.ini (or something like that)

Beshad

@Firesphere thanks. i downgraded my php to 7.0 and composer installation worked fine.

nightjarnz

Another way to think of this sort of thing is "This is specific to this type of thing" - Static method "This is specific to this particular thing" - Instance method If neither of these things work out that well, then maybe a helper class.