2022_10_24_160405_create_grant_items_table.php 772 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. /**
  5. * Class CreateGrantItemsTable.
  6. */
  7. class CreateGrantItemsTable extends Migration
  8. {
  9. /**
  10. * Run the migrations.
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. Schema::create('grant_items', function(Blueprint $table) {
  17. $table->increments('id');
  18. $table->integer('m_id')->index('m_id')->comment('会员ID');
  19. $table->integer('contract_id')->index('contract_id')->comment('合约ID');
  20. $table->double('add_money',16,6)->default(0)->comment('分配数量');
  21. $table->timestamps();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. *
  27. * @return void
  28. */
  29. public function down()
  30. {
  31. Schema::drop('grant_items');
  32. }
  33. }