Added page authorisation and cug processing
This commit is contained in:
38
database/migrations/2018_12_10_214547_frame_add_access.php
Normal file
38
database/migrations/2018_12_10_214547_frame_add_access.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class FrameAddAccess extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('frames', function (Blueprint $table) {
|
||||
$table->renameColumn('public','closed');
|
||||
$table->boolean('access')->default(FALSE);
|
||||
$table->dropForeign(['cug_id']);
|
||||
$table->dropColumn('cug_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('frames', function (Blueprint $table) {
|
||||
$table->dropColumn('access');
|
||||
$table->renameColumn('closed','public');
|
||||
$table->integer('cug_id')->default(0);
|
||||
$table->foreign('cug_id')->references('id')->on('cugs');
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user