123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateMessagesInfoTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('messages_info', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('site_id')->nullable()->comment('站点ID');
- $table->string('title',255)->comment('标题');
- $table->text('content')->comment('内容');
- $table->integer('user_id')->comment('发布人');
- $table->double('price')->nullable()->comment('金额');
- $table->string('phone',11)->nullable()->commet('联系方式');
- $table->text('comment')->nullable()->comment('付费信息');
- $table->tinyInteger('type')->comment('类型:0:免费;1:付费;2:收费');
- $table->integer('sort')->nullable()->comment('排序:越大越靠前');
- $table->softDeletes();
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('messages_info');
- }
- }
|