gplx/mediawiki/extensions/SemanticMediaWiki/docs/architecture/changing.tableschema.md

2.3 KiB

src/SQLStore/TableBuilder

  • TableSchemaManager handles all table definitions used by Semantic MediaWiki in a RDBMS agnostic way
  • Installer takes in the
    • TableSchemaManager (holds the table definitions),
    • TableBuilder (creates/updates/removes an individual table), and
    • TableBuildExaminer (runs some pre/post examination checks after tables have been added or removed) to perform the setup or removal of database tables used by Semantic MediaWiki
  • TableBuilder implements RDBMS specific execution commands and auxiliary classes

src/SQLStore/TableBuilder/Examiner

  • Contains individual classes used by the TableBuildExaminer

Notes

Changing the database schema for Semantic MediaWiki should be done using the TableSchemaManager (please refer to the database.schema.md document when working on database specific changes).

Currently three different RDBMS provider are supported including MySQL/MariaDB, PostgreSQL, and SQLite, to add a different provider it is required to create a new class with RDBMS specific commands together with registering this class using the TableBuilder::factory method. Aside from adding a new class, it is paramount that the new class is tested and passes the test suite before any additional provider can be registered with SMW core.

See also