I need to migrate my DB from Version 2.5 to 3.4.
and i have some question.
1- do we need to migrate which tables ?
2- do i need to modify any tables?
3- is there any tools to do it ?
currently i have customized 3.4 version of moodle in different server, and only want to migrate data into db, if i dump new db , i will loose new customized feature , thats why i need difference between 2 dbs.
I would guess that there are hundreds of database changes between Moodle 2.5 and 3.4 (and that's just counting table definitions, not including and data transitions that take place).
If you want to see the differences, then there is a perfectly good tool designed for doing that - it is the Moodle upgrade process. Copy your database, upgrade it, then compare with the original.
If you have already configured your 3.4 site, then the only real way to merge the sites together would be to backup each of the courses from the old site and restore them to the new site. If the old site has a lot of courses and your new site has only configuration, then it will be quicker to just upgrade, then redo the configuration afterwards.
As i understand, there is no script to mapping only data Base from old version to new version.
ill try to do upgrading , and hope wont get issue with customized libs.
may i ask , upgrading will map data to new db schema or will merge with it (new version) if you know?
Test test test.
We migrated from 1.9 to 2.6, which really was a big leap. We had a heavily customised 1.9 where we had changed core tables, and messed with core code.
It took me some months to unpick the mess and find ways of doing things that didn't require core changes. I had to create new plugins and add lots of renderer overrides to achieve it. The goal must be to leave your new Moodle in a position that makes it easy to upgrade going forward. Otherwise, in the future, you'll find yourself in the same position you're in now.
By the time we did our migration, I had already tested the full process on dev servers 3 or 4 times, so knew exactly what to expect. So test test test.
ps. At the beginning of our process, I was looking at manually migrating the database. But that was a waste of time. I found myself copying code from upgrade.php files. Just go the Moodle way.
Same issue , should revamp some older styled code. ill try to follow moodle way, but moodle also ask to upgrade twice.
first to version 3 then 3.4, if im in right trunk .
is there any way which directly upgrade from 2.5 to 3.4 ?
No - you cannot go directly from 2.5 to 3.4.
However, there is usually no problem going from a customised 2.5 to a clean 3.0 to a customised 3.4 (as long as you ignore a few 'missing plugin' warnings during the 3.0 upgrade part). I've done this a number of times (but it does depend on exactly what you have customised).
When we upgraded from 1.9 to 2.6 we had to go via 2.2. This is so that Moodle can keep the upgrade scripts to a sensible level of detail. If you look at /lib/db/upgrade.php (https://github.com/moodle/moodle/blob/091b2fad148199f24caa551ed3425697397f2e23/lib/db/upgrade.php#L94) for 3.4, you'll see that it requires you to upgrade 3.0 first. If look at the same line in 3.0 you can upgrade from 2.2 to 3.0.
Thanks guys, everything seems ok, only need to check if plugins data still there after upgrading , hope it wont overriding during new installation (as moodle ask to install new version of plugin instead of update).
beside that , may i know these "to be deleted" sign needs to delete manually from db??