diff --git a/README.md b/README.md index 628c496..769c710 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,13 @@ If you don't want to affect the stability of the rest of the packages, you can a ## Installation -Begin by installing the package through Composer. Edit your project's `composer.json` to require `mitchellvanw/laravel-doctrine`. +Begin by installing the package through Composer. Edit your project's `composer.json` to require `rsamborski/laravel-doctrine`. > This package is still in it's early stages, but fully functional. Is it possible that the API might change slightly, no drastic changes. ```php "require": { - "mitchellvanw/laravel-doctrine": "0.5.*" + "rsamborski/laravel-doctrine": "0.5.*" } ``` diff --git a/composer.json b/composer.json index 6085771..094af49 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "mitchellvanw/laravel-doctrine", + "name": "rsamborski/laravel-doctrine", "description": "The Doctrine 2 implementation that melts with Laravel 4", "version": "0.5.0", "keywords": ["doctrine", "doctrine 2", "orm", "laravel"], diff --git a/src/Console/SchemaUpdateCommand.php b/src/Console/SchemaUpdateCommand.php index 2a10b83..98a4736 100644 --- a/src/Console/SchemaUpdateCommand.php +++ b/src/Console/SchemaUpdateCommand.php @@ -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; @@ -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!'); } } @@ -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.'] ]; } } diff --git a/src/Traits/SoftDeletes.php b/src/Traits/SoftDeletes.php index 021ebc8..9059b75 100644 --- a/src/Traits/SoftDeletes.php +++ b/src/Traits/SoftDeletes.php @@ -23,6 +23,7 @@ public function setDeletedAt(DateTime $deletedAt) public function isDeleted() { - return new DateTime > $this->deletedAt; + if($this->deletedAt == null) return false; + else return new DateTime > $this->deletedAt; } }