I couldn't get CentralNotice to work, running update.php didn't populate the database tables.
I went looking in the code and found that CNDatabasePatcher.php has branches for MySQL and for SQLite, and returns true without doing anything on Postgres (or any other hypothetical backend that isn't MySQL or SQLite).
As of writing, affects both the version from https://www.mediawiki.org/wiki/Special:ExtensionDistributor/CentralNotice for 1.35 as well as the latest git master.
Steps to reproduce:
- Have a MediaWiki 1.35 instance with a Postgres database.
- Add CentralNotice to extensions
- Add to LocalSettings.php the snippet below
- Run maintenance/update.php. It should exit with no errors, but the output will make zero mention of cn_notices or other CentralNotice DB tables. I attached the output from running locally below.
- Visit Special:CentralNotice
- Observe database error
Database error:
/w/Special:CentralNotice Wikimedia\Rdbms\DBQueryError from line 1699 of <install directory>/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Error 42P01: ERROR: relation "cn_notices" does not exist LINE 1: ...p_notice_id = notices.not_id ) AS projects FROM "cn_notice...
LocalSettings.php:
$wgShowExceptionDetails = true; $wgShowDBErrorBacktrace = true; $wgShowSQLErrors = true; wfLoadExtension( 'CentralNotice' ); $wgNoticeInfrastructure = true; $wgNoticeProjects = [];
update.php output: