1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreatePoliciesTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('policies', function (Blueprint $table) {
- $table->id();
- $table->bigInteger('province')->default(0)->comment('省份');
- $table->bigInteger('city')->default(0)->comment('市');
- $table->bigInteger('area')->default(0)->comment('县/区');
- $table->bigInteger('street')->default(0)->comment('乡级');
- $table->string('address', 300)->nullable()->comment('地址');
- $table->string('title')->nullable()->comment('标题');
- $table->string('description', 500)->nullable()->comment('简介');
- $table->text('body')->nullable()->comment('内容');
- $table->string('source')->nullable()->comment('来源');
- $table->date('release_time')->comment('发布时间');
- $table->bigInteger('admin_id')->default(0);
- $table->tinyInteger('status')->default(1);
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('policies');
- }
- }
|