function ensure_upgrade_sanity() { // Check column collation is equal to the default if (is_mysql()) { require_once 'ddl.php'; if (table_exists(new XMLDBTable('event_type'))) { if (!column_collation_is_default('event_type', 'name')) { throw new ConfigSanityException(get_string('dbcollationmismatch', 'admin')); } } if (!mysql_has_trigger_privilege()) { throw new ConfigSanityException(get_string('mysqlnotriggerprivilege', 'error')); } } if (is_postgres() && !postgres_create_language('plpgsql')) { throw new ConfigSanityException(get_string('plpgsqlnotavailable', 'error')); } }
function ensure_upgrade_sanity() { // Check column collation is equal to the default if (is_mysql()) { require_once 'ddl.php'; if (table_exists(new XMLDBTable('event_type'))) { if (!column_collation_is_default('event_type', 'name')) { throw new ConfigSanityException(get_string('dbcollationmismatch', 'admin')); } } } }