[PR #142] [MERGED] Expanded Migrations (Flyway, Liquibase XML/YAML, Laravel) & Adds Native DBDiff Migration CLI & Supabase Support #271

Closed
opened 2026-03-07 20:42:37 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/DBDiff/DBDiff/pull/142
Author: @jasdeepkhalsa
Created: 3/3/2026
Status: Merged
Merged: 3/3/2026
Merged by: @jasdeepkhalsa

Base: masterHead: feature/expanded-migrations


📝 Commits (10+)

  • e22f1e9 feat: add output formats & native migration runner
  • 7df60fd feat: Supabase integration (DSN URL parsing, --db-url, --server1-url/--server2-url, pgbouncer)
  • 98133f6 fix: bump minimum PHP requirement to 8.0 (str_contains/match/Attributes already in use)
  • 6cf6499 Add unit tests for migration format, runner, and config classes
  • 70b4b2b fix(DsnParser): handle sqlite:///abs/path — PHP 8.3 parse_url returns false
  • dac6620 ci: add unit-tests job; drop PHP 7.4 from all matrices
  • 6edf548 drop: remove all PHP 7.x support (EOL November 2022)
  • 1405958 refactor: address SonarQube issues across migration classes
  • f615747 test: fix GHA unit-tests job + add comprehensive test coverage for new code
  • 74404b9 chore: add composer.lock; pin platform.php to 8.0 for reproducible CI

📊 Changes

49 files changed (+8708 additions, -147 deletions)

View changed files

📝 .env.example (+0 -1)
📝 .github/workflows/tests.yml (+29 -3)
📝 .gitignore (+1 -0)
.travis.yml (+0 -14)
📝 DOCKER.md (+1 -11)
📝 README.md (+105 -9)
📝 composer.json (+7 -1)
composer.lock (+4194 -0)
📝 dbdiff (+29 -2)
📝 dbdiff.php (+29 -2)
dbdiff.yml.example (+81 -0)
📝 docker-compose.yml (+0 -65)
📝 scripts/run-tests.sh (+10 -0)
📝 src/DBDiff.php (+44 -20)
src/Migration/Command/ConfigOptionTrait.php (+68 -0)
src/Migration/Command/DiffCommand.php (+333 -0)
src/Migration/Command/MigrationBaselineCommand.php (+73 -0)
src/Migration/Command/MigrationDownCommand.php (+66 -0)
src/Migration/Command/MigrationNewCommand.php (+56 -0)
src/Migration/Command/MigrationRepairCommand.php (+66 -0)

...and 29 more files

📄 Description

  • Migration runner: new migration:up/down/status/validate/repair/baseline commands; YYYYMMDDHHMMSS_name.up/down.sql file pairs; SHA-256 checksum tracking via _dbdiff_migrations table
  • Output formats: --format flag on diff; supports native, Flyway, Liquibase XML/YAML, and Laravel migration class
  • Supabase / DSN URLs: --server1-url/--server2-url and --db-url accept full connection URLs; auto-detects Supabase hosts, sets SSL, enables pgbouncer on port 6543
  • CLI: migrated from aura/cli to Symfony Console; dbdiff.yml config file support added
  • Unit tests: 108 tests across DsnParser, all 5 format classes, and MigrationFile; no DB required
  • CI: new unit-tests job (PHP 8.0–8.5, no service); PHP 7.x removed from all matrices
  • Drop PHP 7.x: EOL Nov 2022; codebase already used PHP 8.0+ syntax

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/DBDiff/DBDiff/pull/142 **Author:** [@jasdeepkhalsa](https://github.com/jasdeepkhalsa) **Created:** 3/3/2026 **Status:** ✅ Merged **Merged:** 3/3/2026 **Merged by:** [@jasdeepkhalsa](https://github.com/jasdeepkhalsa) **Base:** `master` ← **Head:** `feature/expanded-migrations` --- ### 📝 Commits (10+) - [`e22f1e9`](https://github.com/DBDiff/DBDiff/commit/e22f1e90f072e0ff623756d2c0a1f55c14b6a3b3) feat: add output formats & native migration runner - [`7df60fd`](https://github.com/DBDiff/DBDiff/commit/7df60fd94d2bfd31cc26b15748659d2cefde8b5c) feat: Supabase integration (DSN URL parsing, --db-url, --server1-url/--server2-url, pgbouncer) - [`98133f6`](https://github.com/DBDiff/DBDiff/commit/98133f68bed2b3ab691de01fb9ee735c9a8bc711) fix: bump minimum PHP requirement to 8.0 (str_contains/match/Attributes already in use) - [`6cf6499`](https://github.com/DBDiff/DBDiff/commit/6cf64992438ba8fb6d9de3488ca2817d4b380c48) Add unit tests for migration format, runner, and config classes - [`70b4b2b`](https://github.com/DBDiff/DBDiff/commit/70b4b2b85e441900041608754008b789caec8f27) fix(DsnParser): handle sqlite:///abs/path — PHP 8.3 parse_url returns false - [`dac6620`](https://github.com/DBDiff/DBDiff/commit/dac6620af21808e911aafb6b390f09bd6e7d7d54) ci: add unit-tests job; drop PHP 7.4 from all matrices - [`6edf548`](https://github.com/DBDiff/DBDiff/commit/6edf54876595e0a5f9ed93f14706f1dda7888b24) drop: remove all PHP 7.x support (EOL November 2022) - [`1405958`](https://github.com/DBDiff/DBDiff/commit/1405958d168c2f1af499df6ad3a3531a90014f07) refactor: address SonarQube issues across migration classes - [`f615747`](https://github.com/DBDiff/DBDiff/commit/f6157478f618186d571ac997ca396b32990cd31f) test: fix GHA unit-tests job + add comprehensive test coverage for new code - [`74404b9`](https://github.com/DBDiff/DBDiff/commit/74404b902d18371b3505e204bc2be5c6abd85df2) chore: add composer.lock; pin platform.php to 8.0 for reproducible CI ### 📊 Changes **49 files changed** (+8708 additions, -147 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+0 -1) 📝 `.github/workflows/tests.yml` (+29 -3) 📝 `.gitignore` (+1 -0) ➖ `.travis.yml` (+0 -14) 📝 `DOCKER.md` (+1 -11) 📝 `README.md` (+105 -9) 📝 `composer.json` (+7 -1) ➕ `composer.lock` (+4194 -0) 📝 `dbdiff` (+29 -2) 📝 `dbdiff.php` (+29 -2) ➕ `dbdiff.yml.example` (+81 -0) 📝 `docker-compose.yml` (+0 -65) 📝 `scripts/run-tests.sh` (+10 -0) 📝 `src/DBDiff.php` (+44 -20) ➕ `src/Migration/Command/ConfigOptionTrait.php` (+68 -0) ➕ `src/Migration/Command/DiffCommand.php` (+333 -0) ➕ `src/Migration/Command/MigrationBaselineCommand.php` (+73 -0) ➕ `src/Migration/Command/MigrationDownCommand.php` (+66 -0) ➕ `src/Migration/Command/MigrationNewCommand.php` (+56 -0) ➕ `src/Migration/Command/MigrationRepairCommand.php` (+66 -0) _...and 29 more files_ </details> ### 📄 Description - **Migration runner**: new `migration:up/down/status/validate/repair/baseline` commands; `YYYYMMDDHHMMSS_name.up/down.sql` file pairs; SHA-256 checksum tracking via `_dbdiff_migrations` table - **Output formats**: `--format` flag on `diff`; supports native, Flyway, Liquibase XML/YAML, and Laravel migration class - **Supabase / DSN URLs**: `--server1-url`/`--server2-url` and `--db-url` accept full connection URLs; auto-detects Supabase hosts, sets SSL, enables pgbouncer on port 6543 - **CLI**: migrated from `aura/cli` to Symfony Console; `dbdiff.yml` config file support added - **Unit tests**: 108 tests across `DsnParser`, all 5 format classes, and `MigrationFile`; no DB required - **CI**: new `unit-tests` job (PHP 8.0–8.5, no service); PHP 7.x removed from all matrices - **Drop PHP 7.x**: EOL Nov 2022; codebase already used PHP 8.0+ syntax --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-07 20:42:37 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/DBDiff#271
No description provided.