Error when I try to add a dateTime field to my table
<p>I am trying to add a new "dateTime" field to my posts table :</p>

<pre><code>public function up()
    {
        Schema::table('posts', function (Blueprint $table) {

            $table-&gt;dateTime('published_at');

        });
    }
</code></pre>

<p>but when I execute <code>php artisan migrate</code> I get the error :</p>

<pre><code>[Illuminate\Database\QueryException]                                                                                                     
  SQLSTATE[23502]: Not null violation: 7 ERROR:  column "published_at" contains null values (SQL: alter table "posts" add column "publish  
  ed_at" timestamp(0) without time zone not null)  




[PDOException]                                                                             

      SQLSTATE[23502]: Not null violation: 7 ERROR:  column "published_at" contains null values
</code></pre>

<p>What's wrong here ?</p>