A location of the initial table creation

A location of the initial table creation

by Hwang Hee -
Number of replies: 2
Where are logics for creating essential tables when you install moodle at the beginning?

I was wondering if there exists some scripts or something like this.

Average of ratings: -
In reply to Hwang Hee

Re: A location of the initial table creation

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The core DB tables are defined in lib/db/install.xml, with the tables for each plugin (core or otherwise) stored in [path_to_plugin]/db/install.xml.

The code that parses these files and installs the DB tables can be found in lib/upgradelib.php.


In reply to Hwang Hee

Re: A location of the initial table creation

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The install is done by admin/index.php. Try reading that file. They key bits are where you get the calls to functions like install_core / upgrade_core / upgrade_noncore. Those functions are defined in lib/upgradelib.php.