From: Vincent Vanwaelscappel Date: Mon, 27 May 2019 14:59:54 +0000 (+0200) Subject: #2783 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=cbfcfa255fb9f5afe364b6c16b8042ef6f9224fe;p=cubist_cms-back.git #2783 --- diff --git a/src/app/Console/Commands/MigrateCommand.php b/src/app/Console/Commands/MigrateCommand.php index e7e0947..ffdcb20 100644 --- a/src/app/Console/Commands/MigrateCommand.php +++ b/src/app/Console/Commands/MigrateCommand.php @@ -69,6 +69,9 @@ class MigrateCommand extends CubistCommand public function _migrate($model) { $this->line('Handling ' . get_class($model)); - $this->line($model->setSchema($this->_schema)); + $res=$model->setSchema($this->_schema); + if(null!==$res) { + $this->line($res); + } } } diff --git a/src/app/Magic/Models/CubistMagicModelAbstract.php b/src/app/Magic/Models/CubistMagicModelAbstract.php index a0c4840..4113b87 100644 --- a/src/app/Magic/Models/CubistMagicModelAbstract.php +++ b/src/app/Magic/Models/CubistMagicModelAbstract.php @@ -175,9 +175,10 @@ class CubistMagicModelAbstract extends Model } if ($this->timestamps) { - $table->addColumn(static::CREATED_AT, 'date'); - $table->addColumn(static::UPDATED_AT, 'date'); - $table->addColumn('deleted_at', 'date'); + $options = ['notnull' => false]; + $table->addColumn(static::CREATED_AT, 'date', $options); + $table->addColumn(static::UPDATED_AT, 'date', $options); + $table->addColumn('deleted_at', 'date', $options); } }