unioil-mobile-api/database/migrations/2018_09_20_053559_promotion...

44 lines
1.1 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Promotions extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('promotions', function (Blueprint $table) {
$table->increments('promotion_id');
$table->uuid('promotion_uuid')->unique();
$table->string('title', 32);
$table->text('description');
$table->string('image',128);
$table->datetime('date_start');
$table->datetime('date_end');
$table->boolean('is_toppromotion');
$table->boolean('is_gps');
$table->tinyInteger('promo_type');
$table->timestamps();
$table->integer('created_by')->default(0);
$table->integer('updated_by')->default(0);
$table->boolean('is_active')->default(1);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('promotions');
}
}