table)) { Schema::create($this->table, function (Blueprint $table) { $table->increments('id'); $table->integer('uid'); $table->integer('category_id'); $table->string('category'); $table->integer('sex'); $table->timestamps(); $table->index('uid', 'idx_uid'); }); } } /** * 删除三天前的表 */ public static function dropTable() { $date = date('Ymd', strtotime('-3 days')); Schema::dropIfExists('novel_user_properties' . $date); } }