Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

DB layer 2.0 migration docs: Difference between revisions

From MoodleDocs
No edit summary
mNo edit summary
Line 5: Line 5:


Also, it's recommended to read the whole XMLDB, DDL and DML documentation and APIs before start with the migration. That will allow you to have some initial knowledge about the new architecture.
Also, it's recommended to read the whole XMLDB, DDL and DML documentation and APIs before start with the migration. That will allow you to have some initial knowledge about the new architecture.
Each change will be as simple as possible, representing one easy rule to follow to adapt the code. When anything become too much complex to be explained as one simple rule, it will contain one link to the [[dmllib_2.0_examples|examples page]].
For any problem in the migration of code, it's recommended to use the [http://moodle.org/mod/forum/view.php?id=45 Databases forum] at [http://moodle.org moodle.org]. Also if you find any bug in the process, pleas report it in the [http://tracker.moodle.org/browse/MDL-14679 Moodle Tracker], that way developers will be able to fix it ASAP.
And finally, feel free to complete/fix the list below with the changes you find in the progress of migration, for sure that will help a lot of developers. Thanks!


== XMLDB changes ==
== XMLDB changes ==

Revision as of 23:55, 22 May 2008

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.


This article defines all the changes that need to be performed in Moodle 1.9 code in order to make it run properly under new Moodle 2.0 DB layer. Changes below are grouped into 3 main blocks (xmldb, ddl and dml) to have them organised.

Although the order of changes showed in this page isn't mandatory at all, it can be interesting to follow it in the migration progress to be able to understand and learn a bit more about all them. That way, you'll end knowing not only what to change but how and why those changes are required.

Also, it's recommended to read the whole XMLDB, DDL and DML documentation and APIs before start with the migration. That will allow you to have some initial knowledge about the new architecture.

Each change will be as simple as possible, representing one easy rule to follow to adapt the code. When anything become too much complex to be explained as one simple rule, it will contain one link to the examples page.

For any problem in the migration of code, it's recommended to use the Databases forum at moodle.org. Also if you find any bug in the process, pleas report it in the Moodle Tracker, that way developers will be able to fix it ASAP.

And finally, feel free to complete/fix the list below with the changes you find in the progress of migration, for sure that will help a lot of developers. Thanks!

XMLDB changes

DDL changes

DML changes

See also