Skip to content

Commit

Permalink
Tweak migration
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Jan 31, 2019
1 parent f77a694 commit d6fa4bf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/migrations/m190120_000000_fix_supertablecontent_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,18 @@ private function _createContentTable($settings, $field)

echo " > Trying to create missing content table for #{$newField->id} ...\n";

if (!$newField) {
echo " > Could not match #{$newField->id} ...\n";

return;
}

if (get_class($newField) !== SuperTableField::class) {
echo " > Field mismatch " . get_class($newField) . " is not a Super Table field ...\n";

return;
}

// Fetch the table that it should be
$contentTable = $this->_getContentTableName($newField);

Expand Down

0 comments on commit d6fa4bf

Please sign in to comment.