Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

Synopsis

This modules provides an API for database cross-schema queries. It allows to query schema/database outside Drupal's schema (in the case of PostgreSQL or database in the case of MySQL) using the same database API provided by Drupal.

For instance, you have a Drupal site running on a PostgreSQL database "mydb". Drupal is installed in PostgreSQL "public" schema. With this module, you can use the same connection to query between multiple schemas at the same time (ie. in a same query) if you use other schemas "myschema1", "some_custom_data_schema_2", etc.

It also works with mysql at the difference that you would use the same connection to query multiple mySQL databases (ie. the same server, port and credential would work for them all).

Furthermore, it is also possible to run Drupal on PostgreSQL and query a MySQL database as long as its credentials are set in the site's settings.php file.

Note: you can only cross-query schemas/databases when they use the same connection (ie. same server+port+credentials).

Current state: beta version.
Database supported:
-PostgreSQL (tested functional)
-MySQL (tested functional)

Version 1.0.x was released for Drupal 8 and 9 and is obsolete now. Version 2.0.x works with both Drupal 9.4+ and Drupal 10 and does not support per-table prefixing (even with Drupal 9.4+ while it was just deprecated but supported by Drupal).

Requirements

Once the main module is enabled, you should also enable at least one external database driver (dbxschema_mysql or dbxschema_pgsql, provided with this module).

Roadmap

  • Better document the API
  • Add automated tests

Credits

The Alliance Bioversity - CIAT.

Restrictions

  • No more support for per-table prefixing used by Drupal 9 and older. The support was deprecated in Drupal 9 and new database driver module were introduced in 9.4 which lead to a rewrite of some parts of this module that removed the support for per-table prefix in "settings.php". If you really need per-table prefixing, send me a message to see what could be done.
  • Not working with very old versions of PostgreSQL and MySQL that don't support cross-schema/database queries.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Dec 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
2.0.0 Stable Dec 3, 2024