table('blog_posts'); $table->addColumn('slug', 'string', ['limit' => 255, 'null'=> true]) ->addColumn('title', 'string', ['limit' => 255, 'null' => true]) ->addColumn('created_at', 'datetime', ['null' => false, 'default'=>"CURRENT_TIMESTAMP"]) ->addColumn('created_by', 'integer', ['null' => false]) ->addColumn('updated_at', 'datetime', ['null' => true]) ->addColumn('updated_by', 'integer', ['null' => true]) ->addColumn('published_at', 'datetime', ['null' => true]) ->addForeignKey('created_by', 'users','id') ->addForeignKey('updated_by', 'users','id') ->addIndex('slug', ['unique' => true]) ->create(); } }