schema->hasTable('organisation_approvals')) { $this->schema->create('organisation_approvals', function (Blueprint $table) { $table->increments('id'); $table->integer('owner_id')->unsigned(); $table->string('hash'); $table->boolean('completed')->default(0); $table->timestamp('expires_at')->nullable(); $table->timestamp('completed_at')->nullable(); $table->integer('approver_id')->unsigned()->nullable(); $table->timestamps(); $table->engine = 'InnoDB'; $table->collation = 'utf8_unicode_ci'; $table->charset = 'utf8'; $table->foreign('approver_id')->references('id')->on('users'); $table->index('owner_id'); $table->index('hash'); }); } } /** * {@inheritdoc} */ public function down() { $this->schema->drop('organisation_approvals'); } }