1
0
mirror of https://github.com/cjango/dcat-vue.git synced 2025-12-06 22:40:03 +08:00
Files
dcat-vue/updates/create_china_areas_table.php
2022-12-30 16:09:23 +08:00

35 lines
788 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateChinaArea extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('china_areas', function (Blueprint $table) {
$table->id('code');
$table->string('name')->comment('地区');
$table->unsignedTinyInteger('level')->index();
$table->unsignedBigInteger('pcode')->index()->comment('上级区划');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('china_areas');
}
}