Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

compatibility with new data namespace #11

Merged
merged 2 commits into from
Mar 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down