XMLDB installation enabled...

XMLDB installation enabled...

by Eloy Lafuente (stronk7) -
Number of replies: 3
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi,

since some minutes ago, installation of Moodle under 1.7dev is using the new XMLDB schema to generate all the DB objects.

The mechanism prioritises the use of the new install.xml files inside each db directory over the old .sql files (but these will continue working for modules/blocks... not containing the new xml file).

So, this have some important effects is the way all we work:

- Old .sql files won't be used anymore if the newer install.xml file is present.
- Those new install.xml files must be kept in sync (using the XMLDB Editor) everytime we create/alter/drop any db element in the update and upgrade scripts (exactly like we used to modify the old .sql files).
- 3rd part modules/blocks/enrollments.... having db structures should create their proper install.xml files (to abandon the use of the old .sql files ASAP). Note that the XMLD Editor includes one simple but effective tool to make some reverse engineering from DB to XML, so the process of creating the install.xml files is really quick and easy.

Also, note that the change described here is only about INSTALLATIONS for now. DB UPDATES will continue happening with the use of the old "mysql.php" and "postgres7.php" files over some more days (until we have all the new DDL required functions ready). Then, also UPDATES will be unified into a new "upgrade.php" file for all the DBs.

Finally, the new XMLDB installation also supports the creation of all the DB objects both under Oracle (with some problems exactly now) and MSSQL if you have the proper drivers installed under PHP and your config.php file pointing to one (oci8po or mssql are the db types) of those RDBMS.

Changes will arrive really quickly in the next days so stay tuned. You can find more info about the whole process (performed and pending tasks, problems, roadmap, drivers, interesting links, the editor, the XML format...) at:

http://docs.moodle.org/en/XML_database_schema

Feel free to start playing with the editor and the installation stuff. It's the future, moodlers!

Ciao smile
Average of ratings: -
In reply to Eloy Lafuente (stronk7)

Re: XMLDB installation enabled...

by Éric Bugnet -
Picture of Documentation writers Picture of Plugin developers Picture of Translators
Hi,

What's up today on the 1.7+ ?

I'm trying to make a block, without DB table, but I need to add some parameters in mdl_config table.

I understand that I haven't to use install.xml (only if I want to create new table). So, how can I update config table using update.php ?
Before I used mysql.sql and mysql.php, but I try to use update.php and I don't know how.

Nothing happen when I'm using "insert_record()" in update.php


Does I make a mistake ???

Thanks for your help.

Eric