migrations fix basemigration not abstract migration
Some checks failed
CI / testsuite (pgsql, 8.2, ) (push) Successful in 5m36s
CI / testsuite (mysql, 8.2, ) (push) Successful in 5m53s
CI / testsuite (mysql, 8.4, ) (push) Successful in 8m59s
CI / testsuite (sqlite, 8.2, ) (push) Successful in 5m34s
CI / testsuite (sqlite, 8.2, prefer-lowest) (push) Failing after 4m14s
CI / testsuite (pgsql, 8.4, ) (push) Successful in 9m1s
CI / Coding Standard & Static Analysis (push) Successful in 4m23s
CI / testsuite (sqlite, 8.4, ) (push) Successful in 8m36s
Some checks failed
CI / testsuite (pgsql, 8.2, ) (push) Successful in 5m36s
CI / testsuite (mysql, 8.2, ) (push) Successful in 5m53s
CI / testsuite (mysql, 8.4, ) (push) Successful in 8m59s
CI / testsuite (sqlite, 8.2, ) (push) Successful in 5m34s
CI / testsuite (sqlite, 8.2, prefer-lowest) (push) Failing after 4m14s
CI / testsuite (pgsql, 8.4, ) (push) Successful in 9m1s
CI / Coding Standard & Static Analysis (push) Successful in 4m23s
CI / testsuite (sqlite, 8.4, ) (push) Successful in 8m36s
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Migrations\AbstractMigration;
|
||||
use Migrations\BaseMigration;
|
||||
|
||||
class InitialAddresses extends AbstractMigration {
|
||||
class InitialAddresses extends BaseMigration {
|
||||
|
||||
/**
|
||||
* Up Method.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Migrations\AbstractMigration;
|
||||
use Migrations\BaseMigration;
|
||||
|
||||
class InitialAddressesDynamicForeignKey extends AbstractMigration {
|
||||
class InitialAddressesDynamicForeignKey extends BaseMigration {
|
||||
|
||||
/**
|
||||
* Up Method.
|
||||
|
||||
@@ -9,6 +9,7 @@ use Cake\Core\ContainerInterface;
|
||||
use Cake\Core\PluginApplicationInterface;
|
||||
use Cake\Http\MiddlewareQueue;
|
||||
use Cake\Routing\RouteBuilder;
|
||||
use Migrations\Command\SeedCommand;
|
||||
|
||||
/**
|
||||
* Plugin for CakeAddresses
|
||||
@@ -71,6 +72,7 @@ class CakeAddressesPlugin extends BasePlugin {
|
||||
// Add your commands here
|
||||
|
||||
$commands = parent::console($commands);
|
||||
$commands->add('migrations seed', SeedCommand::class);
|
||||
|
||||
return $commands;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ use Cake\Core\Configure;
|
||||
use Cake\Core\Plugin;
|
||||
use Cake\Database\Connection;
|
||||
use Cake\Datasource\ConnectionManager;
|
||||
use Cake\TestSuite\Fixture\SchemaLoader;
|
||||
use CakeAddresses\CakeAddressesPlugin;
|
||||
use Migrations\TestSuite\Migrator;
|
||||
use TestApp\Controller\AppController;
|
||||
@@ -57,6 +58,7 @@ Configure::write('App', [
|
||||
|
||||
Configure::write('debug', true);
|
||||
Configure::write('CakeAddresses', []);
|
||||
Configure::write('Migrations.backend', 'builtin');
|
||||
|
||||
$cache = [
|
||||
'default' => [
|
||||
@@ -81,8 +83,6 @@ $cache = [
|
||||
|
||||
Cache::setConfig($cache);
|
||||
|
||||
class_alias(AppController::class, 'App\Controller\AppController');
|
||||
|
||||
Plugin::getCollection()->add(new CakeAddressesPlugin());
|
||||
|
||||
Chronos::setTestNow(Chronos::now());
|
||||
@@ -111,7 +111,18 @@ ConnectionManager::setConfig('test', [
|
||||
*/
|
||||
// Load a schema dump file.
|
||||
//(new SchemaLoader())->loadSqlFiles('tests/schema.sql', 'test');
|
||||
ConnectionManager::alias('test', 'default');
|
||||
|
||||
if (getenv('FIXTURE_SCHEMA_METADATA')) {
|
||||
$loader = new SchemaLoader();
|
||||
$loader->loadInternalFile(getenv('FIXTURE_SCHEMA_METADATA'));
|
||||
}
|
||||
|
||||
if (file_exists(ROOT . DS . 'config' . DS . 'bootstrap.php')) {
|
||||
require ROOT . DS . 'config' . DS . 'bootstrap.php';
|
||||
}
|
||||
|
||||
// Class aliases for test app
|
||||
class_alias(AppController::class, 'App\Controller\AppController');
|
||||
$migrator = new Migrator();
|
||||
$migrator->run(['plugin' => 'CakeAddresses']);
|
||||
|
||||
Reference in New Issue
Block a user