Files
exchange-2.0/database/migrations/2020_11_11_065757_create_segments_table.php
T
omair saleh 05401f6bbc large commit
2021-03-11 13:06:40 +08:00

38 lines
922 B
PHP

<?php
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\SegmentConstants;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSegmentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('segments', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->integer('type')->default(SegmentConstants::STANDARD_SEGMENT);
$table->integer('status')->default(ApprovalStatus::APPROVED);
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('segments');
}
}