2019_05_06_183349_create_teamOrder.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateTeamOrder extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. if (!Schema::hasTable('yz_team_order_statistics')) {
  15. Schema::create('yz_team_order_statistics', function (Blueprint $table) {
  16. $table->increments('id');
  17. $table->integer('uid')->default(0);
  18. $table->integer('uniacid')->default(0);
  19. $table->integer('team_order_quantity')->default(0)->comment('团队下线订单数');
  20. $table->integer('team_order_amount')->default(0)->comment('团队下线订单金额');
  21. $table->integer('pay_count')->default(0)->nullable()->comment('团队支付人数');
  22. $table->integer('team_count')->default(0)->nullable()->comment('团队总人数');
  23. $table->integer('created_at')->nullable();
  24. $table->integer('updated_at')->nullable();
  25. });
  26. \Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix()
  27. . "yz_team_order_statistics comment '订单--团队订单统计表'");//表注释
  28. }
  29. }
  30. /**
  31. * Reverse the migrations.
  32. *
  33. * @return void
  34. */
  35. public function down()
  36. {
  37. //
  38. }
  39. }