hasTable('marketing'); if (!$exists) { $table = $this->table('marketing'); $table->addColumn('user_id','integer') ->addColumn('password_protect','string',["limit" => 255]) ->addColumn('content_template_path','text') ->addColumn('header_template_path','text') ->addColumn('footer_template_path','text') ->addColumn('title','text') ->addColumn('seo_title','text') ->addColumn('seo_description','text') ->addColumn('content','text') ->addColumn('status','integer') ->addColumn('publish_date','date', ['null' => true]) ->addColumn('slug','text') ->addColumn('created_at','date') ->addColumn('updated_at','datetime') ->addIndex(["slug"], ['unique' => true]) ->create(); } } public function down() { $this->table('marketing')->drop()->save(); } }