| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateNewVotes extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('new_votes', function (Blueprint $table) {
- $table->engine = 'InnoDB';
- $table->increments('id')->comment('投票记录id');
- $table->integer('player_id')->unsigned()->comment('得票人');
- $table->string('openid',255)->comment('投票微信用户的个人openid, 用于防止刷票');
- $table->integer('vote')->unsigned()->default(1)->comment('投票数,为1');
- $table->string('we_nickname',120)->comment('微信用户昵称');
- $table->string('we_image',255)->comment('微信用户的头像地址');
- $table->string('ip',12)->comment('ip');
- $table->timestamp('create_at')->nullable()->default(null)->comment('投票时间');
- $table->timestamp('update_at')->nullable()->default(null);
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('new_votes');
- }
- }
|