From 1739d4c1e4965a672afa1ecdb3d950433020a4d7 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Thu, 31 Oct 2024 23:29:19 -0400 Subject: [PATCH] Reduce scope of changes. CI is too red right now. --- src/Command/BakeMigrationDiffCommand.php | 2 -- src/Command/BakeMigrationSnapshotCommand.php | 1 - src/Command/SnapshotTrait.php | 13 ++----------- templates/bake/config/diff.twig | 6 ------ templates/bake/config/snapshot.twig | 6 ------ .../pgsql/test_snapshot_auto_id_disabled_pgsql.php | 4 ++-- .../pgsql/test_snapshot_not_empty_pgsql.php | 4 ++-- .../pgsql/test_snapshot_plugin_blog_pgsql.php | 4 ++-- .../test_snapshot_auto_id_disabled_sqlite.php | 4 ++-- .../sqlite/test_snapshot_not_empty_sqlite.php | 4 ++-- .../sqlite/test_snapshot_plugin_blog_sqlite.php | 4 ++-- tests/comparisons/Seeds/pgsql/testWithData.php | 4 ++-- .../Seeds/pgsql/testWithDataAndLimit.php | 4 ++-- 13 files changed, 18 insertions(+), 42 deletions(-) diff --git a/src/Command/BakeMigrationDiffCommand.php b/src/Command/BakeMigrationDiffCommand.php index c4083f5a..5ee75239 100644 --- a/src/Command/BakeMigrationDiffCommand.php +++ b/src/Command/BakeMigrationDiffCommand.php @@ -18,7 +18,6 @@ use Cake\Console\Arguments; use Cake\Console\ConsoleIo; use Cake\Console\ConsoleOptionParser; -use Cake\Core\Configure; use Cake\Database\Connection; use Cake\Database\Schema\CollectionInterface; use Cake\Database\Schema\TableSchema; @@ -200,7 +199,6 @@ public function templateData(Arguments $arguments): array 'data' => $this->templateData, 'dumpSchema' => $this->dumpSchema, 'currentSchema' => $this->currentSchema, - 'backend' => Configure::read('Migrations.backend', 'builtin'), ]; } diff --git a/src/Command/BakeMigrationSnapshotCommand.php b/src/Command/BakeMigrationSnapshotCommand.php index bc51d3a8..ea711069 100644 --- a/src/Command/BakeMigrationSnapshotCommand.php +++ b/src/Command/BakeMigrationSnapshotCommand.php @@ -115,7 +115,6 @@ public function templateData(Arguments $arguments): array 'action' => 'create_table', 'name' => $this->_name, 'autoId' => $autoId, - 'backend' => Configure::read('Migrations.backend', 'builtin'), ]; } diff --git a/src/Command/SnapshotTrait.php b/src/Command/SnapshotTrait.php index aa35880f..2c09fea8 100644 --- a/src/Command/SnapshotTrait.php +++ b/src/Command/SnapshotTrait.php @@ -15,7 +15,6 @@ use Cake\Console\Arguments; use Cake\Console\ConsoleIo; -use Cake\Core\Configure; /** * Trait needed for all "snapshot" type of bake operations. @@ -63,11 +62,7 @@ protected function markSnapshotApplied(string $path, Arguments $args, ConsoleIo $newArgs = array_merge($newArgs, $this->parseOptions($args)); $io->out('Marking the migration ' . $fileName . ' as migrated...'); - if (Configure::read('Migrations.backend') == 'builtin') { - $this->executeCommand(MarkMigratedCommand::class, $newArgs, $io); - } else { - $this->executeCommand(MigrationsMarkMigratedCommand::class, $newArgs, $io); - } + $this->executeCommand(MigrationsMarkMigratedCommand::class, $newArgs, $io); } /** @@ -83,11 +78,7 @@ protected function refreshDump(Arguments $args, ConsoleIo $io): void $newArgs = $this->parseOptions($args); $io->out('Creating a dump of the new database state...'); - if (Configure::read('Migrations.backend') == 'builtin') { - $this->executeCommand(DumpCommand::class, $newArgs, $io); - } else { - $this->executeCommand(MigrationsDumpCommand::class, $newArgs, $io); - } + $this->executeCommand(MigrationsDumpCommand::class, $newArgs, $io); } /** diff --git a/templates/bake/config/diff.twig b/templates/bake/config/diff.twig index 2d8677d0..21b56a22 100644 --- a/templates/bake/config/diff.twig +++ b/templates/bake/config/diff.twig @@ -20,15 +20,9 @@