Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Smart DB Tools

Security covered Drupal 10–11
View on drupal.org

This module enhances the database dumping tool by allowing you to export database tables into individual PHP files. It also provides options to split large tables into smaller files to reduce memory usage during export and import, making it easier to manage and maintain database migration fixtures.

Smart DB Tools is a module🤔 which implements the feature requested in #3213633: Improve DX of maintaining migration database fixtures: provide an option for creating per-table database fixtures in DbDumpcommand.

It contains an enhanced version of the DbToolsApplication of Drupal core with an improved dump command that allows users to save a database dump into multiple PHP scripts – so each database table will be exported in its own file.

This functionality greatly reduces the time spent on cleaning changed database fixture scripts.

Usage

The application is backward-compatible with the DbToolsApplication in Drupal core. The only difference is that if the --split-destination option is passed to the script, then instead of a single file, per-table database PHP scripts will be generated. The value of the --split-destination option is the name of the main PHP database dump file.

To lower memory consumption (both on export and import), tables with more than 1000 records are also exported into multiple files (this is by default). This option can be changed by providing a --subsplit-limit option set to the desired value. Using --subsplit-limit 1000 works well with PHP memory_limit set to 256M. Setting this limit to a number lower than 1 disables this behavior.

Example

php modules/contrib/smart_db_tools/scripts/smart-db-tools.php dump\
 --database fixture_connection\
 --subsplit-limit 5000\
 --split-destination modules/custom/db-dump.php

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
2
Tracked since
Dec 2025
Latest release
1 month ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.2.0 Stable 10–11 Jul 19, 2026
1.1.0 Stable 10–11 Dec 9, 2025