schema->hasTable('organisation_members')) { $this->schema->create('organisation_members', function (Blueprint $table) { $table->increments('map_id'); $table->integer('user_id')->unsigned(); $table->integer('organisation_id')->unsigned(); $table->boolean('flag_admin'); $table->boolean('flag_approved')->default(1)->comment('Set to 1 if the user membership has been approved, 0 otherwise.'); $table->timestamps(); $table->engine = 'InnoDB'; $table->collation = 'utf8_unicode_ci'; $table->charset = 'utf8'; $table->foreign('user_id')->references('id')->on('users'); $table->foreign('organisation_id')->references('id')->on('organisations'); $table->index('user_id'); $table->index('organisation_id'); }); } } /** * {@inheritdoc} */ public function down() { $this->schema->drop('organisation_members'); } }