1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- /**
- * Migration auto-generated by Sequel Pro Laravel Export
- * @see https://github.com/cviebrock/sequel-pro-laravel-export
- */
- class CreateBaseAreaTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('base_area', function (Blueprint $table) {
- $table->integer('id')->comment('编号');
- $table->char('name', 50)->comment('名称');
- $table->integer('pid')->comment('父级');
- $table->char('short_name', 50)->comment('简称');
- $table->tinyInteger('grade')->comment('层级关系');
- $table->smallInteger('city_code')->comment('区号');
- $table->integer('zip_code')->comment('邮编');
- $table->string('merger_name', 1024)->comment('关系值');
- $table->float('lng')->comment('精度');
- $table->float('lat')->comment('维度');
- $table->char('pinyin', 50)->comment('拼音');
- $table->timestamps();
- $table->softDeletes();
- $table->primary('id');
- $table->index('pid', 'idx_pid');
- $table->index('deleted_at', 'idx_deleted_at');
-
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('base_area');
- }
- }
|