| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateYzAnswer extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- //答案表
- if (!Schema::hasTable('yz_answer')) {
- Schema::create('yz_answer', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('uniacid')->nullable()->comment('公众号ID');
- $table->integer('subject_id')->nullable()->comment('题目id');
- $table->string('content',255)->nullable()->comment('答案内容');
- $table->integer('answer')->nullable()->comment('正确答案');
- $table->integer('created_at')->nullable();
- $table->integer('updated_at')->nullable();
- $table->integer('deleted_at')->nullable();
- });
- \Illuminate\Support\Facades\DB::statement("ALTER TABLE `".app('db')->getTablePrefix()."yz_answer` comment'短视频答题--答案表'");//表注释
- }
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- //
- }
- }
|