12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateMsgsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('msgs', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('parent_id');
- $table->unsignedTinyInteger('spid')->comment('是否有回复(0:无回复,1:有回复)');
- $table->integer('from_uid')->comment('发送者');
- $table->integer('to_uid')->comment('接收者');
- $table->mediumText('message')->comment('信息内容');
- $table->unsignedTinyInteger('is_read')->comment('是否阅读(0:未读,:1已读)');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('msgs');
- }
- }
|