Allow plugins and themes to store schema information externally, rather than having a big switch statement that has to expand for every new database type we support.
Allow plugins and themes to store schema information externally, rather than having a big switch statement that has to expand for every new database type we support.

In a plugin you would register the tables that will be added, and call dbdelta on the appropriate schema like this:

DB::register_table('foobar');
DB::dbdelta( $this->get_db_schema() );

A plugin would have a filestructure like this:
schema/sqlite.sql
schema/mysql.sql
schema/pgsql.sql

New databases can be supported by simply dropping in the schema file.


git-svn-id: d0e296eae3c99886147898d36662a67893ae90b2@2086 653ae4dd-d31e-0410-96ef-6bf7bf53c507

dragonmantank/Habari,dragonmantank/Habari,dragonmantank/Habari