Improve DX of maintaining migration database fixtures: provide an option for creating per-table database fixtures in DbDumpcommand

Created on 12 May 2021, almost 4 years ago
Updated 27 April 2023, almost 2 years ago

Problem/Motivation

Right now, updating or maintaining the migration database fixtures is very, very painful and time-consuming task. After a dev exported an updated database fixture, it's very hard to distinguish which changes we want to commit, and which ones we should revert (manually).

Steps to reproduce

Based on the system module's schema, right now the core D7 DB fixture contains a Drupal 7.44 database. Refresh it to the most recent one (7.80), execute database updates, and then export the updated database with

php core/scripts/db-tools.php dump --database fixture_connection > core/modules/migrate_drupal/tests/fixtures/drupal7.php

(See Generating database fixtures for migration tests ).

Proposed resolution

Add a new option for the DbDumpCommand which then generates a set of per-table fixture files.

Remaining tasks

  1. Patch
  2. Doc update
  3. Updating the core fixtures (maybe this should happen in a follow-up?)

User interface changes

Nothing

API changes

New option for DbDumpCommand.

Data model changes

Nothing.

Release notes snippet

TBD.

Feature request
Status

Needs work

Version

10.1

Component
Database update 

Last updated 25 days ago

No maintainer
Created by

🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024