From b471631b786e1caa6cfaecec307cac6a9f3ecb89 Mon Sep 17 00:00:00 2001 From: DarkSide Date: Thu, 28 Mar 2019 17:11:41 +0200 Subject: [PATCH 1/2] compatibility with new data namespace --- src/Migration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Migration.php b/src/Migration.php index eaa7338..d368445 100644 --- a/src/Migration.php +++ b/src/Migration.php @@ -46,12 +46,12 @@ public function __construct($source, $params = []) $this->connection = $source; return; - } elseif ($source instanceof \atk4\data\Persistence_SQL) { + } elseif ($source instanceof \atk4\data\Persistence_SQL || $source instanceof \atk4\data\Persistence\SQL ) { $this->connection = $source->connection; return; } elseif ($source instanceof \atk4\data\Model) { - if ($source->persistence && $source->persistence instanceof \atk4\data\Persistence_SQL) { + if ($source->persistence && ($source->persistence instanceof \atk4\data\Persistence_SQL || $source->persistence instanceof \atk4\data\Persistence\SQL)) { $this->connection = $source->persistence->connection; $this->setModel($source); From 641efde1b5e36aeab1705da826d69266de6e698b Mon Sep 17 00:00:00 2001 From: Romans Malinovskis Date: Thu, 28 Mar 2019 15:12:14 +0000 Subject: [PATCH 2/2] Apply fixes from StyleCI --- src/Migration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Migration.php b/src/Migration.php index d368445..cab202d 100644 --- a/src/Migration.php +++ b/src/Migration.php @@ -46,7 +46,7 @@ public function __construct($source, $params = []) $this->connection = $source; return; - } elseif ($source instanceof \atk4\data\Persistence_SQL || $source instanceof \atk4\data\Persistence\SQL ) { + } elseif ($source instanceof \atk4\data\Persistence_SQL || $source instanceof \atk4\data\Persistence\SQL) { $this->connection = $source->connection; return;