44 lines
1.2 KiB
PHP
44 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class Station extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('station', function (Blueprint $table) {
|
|
$table->increments('station_id');
|
|
$table->uuid('station_uuid')->unique();
|
|
$table->integer('city_id')->default(0);
|
|
$table->string('code', 12);
|
|
$table->string('description', 64);
|
|
$table->double('longitude')->default(0);
|
|
$table->double('latitude')->default(0);
|
|
$table->text('address')->nullable();
|
|
$table->string('contact_number',64)->nullable();
|
|
$table->boolean('is_viewable')->default(0);
|
|
$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('station');
|
|
}
|
|
}
|