Refresh
This commit is contained in:
38
database/migrations/2021_08_15_193704_create_permissions_table.php
Executable file
38
database/migrations/2021_08_15_193704_create_permissions_table.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePermissionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('permissions', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('folder_id')->index('permissions_folder_id_foreign');
|
||||
$table->unsignedBigInteger('user_id')->nullable()->index('permissions_user_id_foreign');
|
||||
$table->tinyInteger('can_create_folder')->default(0);
|
||||
$table->tinyInteger('can_update_folder')->default(0);
|
||||
$table->tinyInteger('can_delete_folder')->default(0);
|
||||
$table->tinyInteger('can_create_document')->default(0);
|
||||
$table->tinyInteger('can_delete_document')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('permissions');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user