schema->hasTable('activities')) { $this->schema->create('activities', function (Blueprint $table) { $table->increments('id'); $table->string('ip_address', 45)->nullable(); $table->integer('user_id')->unsigned(); $table->string('type', 255)->comment('An identifier used to track the type of activity.'); $table->timestamp('occurred_at')->nullable(); $table->text('description')->nullable(); $table->engine = 'InnoDB'; $table->collation = 'utf8_unicode_ci'; $table->charset = 'utf8'; //$table->foreign('user_id')->references('id')->on('users'); $table->index('user_id'); }); } } /** * {@inheritDoc} */ public function down() { $this->schema->drop('activities'); } }