![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/syn.corals.io/Corals/modules/Utility/database/migrations/ |
<?php namespace Corals\Modules\Utility\database\migrations; use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateListOfValuesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('utility_list_of_values', function (Blueprint $table) { $table->increments('id'); $table->string('code')->unique(); $table->string('label')->nullable(); $table->text('value'); $table->unsignedInteger('parent_id')->nullable(); $table->text('properties')->nullable(); $table->string('module')->nullable(); $table->integer('display_order')->default(0); $table->enum('status', ['active', 'inactive'])->default('active'); $table->boolean('hidden')->default(false); $table->softDeletes(); $table->auditable(); $table->timestamps(); $table->foreign('parent_id') ->references('id') ->on('utility_list_of_values') ->onUpdate('cascade') ->onDelete('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('utility_list_of_values'); } }