hasTable('share_external')) { $table = $schema->getTable('share_external'); $changed = false; if (!$table->hasColumn('parent')) { $table->addColumn('parent', Types::BIGINT, [ 'notnull' => false, 'default' => -1, ]); $changed = true; } if (!$table->hasColumn('share_type')) { $table->addColumn('share_type', Types::INTEGER, [ 'notnull' => false, 'length' => 4, ]); $changed = true; } if ($table->hasColumn('lastscan')) { $table->dropColumn('lastscan'); $changed = true; } if ($changed) { return $schema; } } return null; } }