Add an approved flag to the organisation members map table (pending "join organisation" workflow)
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* AVSDev UF Organisations (https://avsdev.uk)
|
||||
*
|
||||
* @link https://git.avsdev.uk/avsdev/sprinkle-organisations
|
||||
* @license https://git.avsdev.uk/avsdev/sprinkle-organisations/blob/master/LICENSE.md (LGPL-3.0 License)
|
||||
*/
|
||||
|
||||
namespace UserFrosting\Sprinkle\Organisations\Database\Migrations\v002;
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use UserFrosting\Sprinkle\Core\Database\Migration;
|
||||
|
||||
/**
|
||||
* Organisations members table migration
|
||||
* Add an approved flag
|
||||
* Version 1.0.0.
|
||||
*
|
||||
* @author Craig Williams (https://avsdev.uk)
|
||||
*/
|
||||
class UpdateOrganisationMembersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $dependencies = [
|
||||
'\UserFrosting\Sprinkle\Organisations\Database\Migrations\v001\OrganisationMembersTable',
|
||||
];
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if ($this->schema->hasTable('organisation_members')) {
|
||||
$this->schema->table('organisation_members', function (Blueprint $table) {
|
||||
$table->integer('flag_approved')->unsigned();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
$this->schema->table('organisation_members', function (Blueprint $table) {
|
||||
$table->dropColumn('flag_approved');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user