Skip to content
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
6 changes: 3 additions & 3 deletions src/Console/SchemaUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function fire()
{
$this->info('Checking if database needs updating....');
$clean = $this->option('clean');
$sql = $this->tool->getUpdateSchemaSql($this->metadata->getAllMetadata(), $clean);
$sql = $this->tool->getUpdateSchemaSql($this->metadata->getAllMetadata(), !$clean);
if (empty($sql)) {
$this->info('No updates found.');
return;
Expand All @@ -62,7 +62,7 @@ public function fire()
$this->info(implode(';' . PHP_EOL, $sql));
} else {
$this->info('Updating database schema....');
$this->tool->updateSchema($this->metadata->getAllMetadata());
$this->tool->updateSchema($this->metadata->getAllMetadata(), !$clean);
$this->info('Schema has been updated!');
}
}
Expand All @@ -71,7 +71,7 @@ protected function getOptions()
{
return [
['sql', false, InputOption::VALUE_NONE, 'Dumps SQL query and does not execute update.'],
['clean', null, InputOption::VALUE_OPTIONAL, 'When using clean model all non-relevant to this metadata assets will be cleared.']
['clean', null, InputOption::VALUE_NONE, 'Use this flag to clear all assets from the database not relevant to the current metadata.']
];
}
}
Expand Down