forked from mutms/moodle-tool_muprog
-
Notifications
You must be signed in to change notification settings - Fork 1
MSSQL Compatibility Notes
binon edited this page Aug 7, 2025
·
4 revisions
This page documents the steps required to set up and run the tool_muprog and related plugins for Moodle using a Microsoft SQL Server (MSSQL) backend. The original plugins were designed for MySQL and required compatibility fixes for MSSQL.
Some plugins (notably tool_muprog and tool_mulib) use SQL-reserved keywords like public as column names. This causes errors when using MSSQL, as it requires reserved words to be escaped using square brackets ([public]).
- Unknown DDL library error
- Field must contain full specs. Rename skipped
-
publicis a reserved keyword in MSSQL. - Moodle DDL does not automatically escape it.
- This breaks plugin installation or upgrades.
- The
publiccolumn was renamed toispublicin the plugin’sinstall.xml,upgrade.php, and all usages. - This avoids database-specific syntax and ensures compatibility across both MSSQL and MySQL.
- All changes were made in a forked version of the plugin to isolate compatibility changes.
- Moodle’s DDL layer doesn’t always handle escaped identifiers (
[public]) cleanly. - Escaped column names break cross-DB compatibility and future-proofing.
- Renaming maintains abstraction and consistency.