mirror of
https://github.com/cjango/dcat-vue.git
synced 2025-12-06 22:40:03 +08:00
一些优化,新增行政区划
This commit is contained in:
34
updates/create_china_areas_table.php
Normal file
34
updates/create_china_areas_table.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user