42 lines
984 B
PHP
42 lines
984 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CodeCity extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('code_city', function (Blueprint $table) {
|
|
$table->increments('city_id');
|
|
$table->integer('province_id');
|
|
$table->uuid('city_uuid')->unique();
|
|
$table->string('code',64);
|
|
$table->string('name',64);
|
|
$table->integer('created_by')->default(0);
|
|
$table->integer('updated_by')->default(0);
|
|
$table->timestamp('created_at');
|
|
$table->timestamp('updated_at');
|
|
$table->boolean('is_active')->default(1);
|
|
|
|
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('code_city');
|
|
}
|
|
}
|