| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateYzSubject extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- //题目表
- if (!Schema::hasTable('yz_subject')) {
- Schema::create('yz_subject', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('uniacid')->nullable()->comment('公众号ID');
- $table->string('title')->nullable()->comment('题目');
- $table->decimal('uid_reward_value',5,2)->nullable()->comment('会员奖励值设置');
- $table->decimal('uid_reward_ratio',5,2)->nullable()->comment('会员奖励比例设置');
- $table->decimal('parent_reward_value',5,2)->nullable()->comment('上级奖励值设置');
- $table->decimal('parent_reward_ratio',5,2)->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_subject` comment'短视频答题--题目表'");//表注释
- }
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- //
- }
- }
|