2021_02_18_105955_change_owner_operation_table.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class ChangeOwnerOperationTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::table('owner_price_operations', function (Blueprint $table) {
  15. $table->string("discount_count")->nullable()->comment("减免数")->change();
  16. $table->string("total_discount_price")->nullable()->comment("减免总价")->change();
  17. });
  18. Schema::table('owner_price_operation_items', function (Blueprint $table) {
  19. $table->string("discount_price")->nullable()->comment("减免单价")->change();
  20. });
  21. }
  22. /**
  23. * Reverse the migrations.
  24. *
  25. * @return void
  26. */
  27. public function down()
  28. {
  29. Schema::table('owner_price_operations', function (Blueprint $table) {
  30. $table->integer("discount_count")->nullable()->comment("减免数")->change();
  31. $table->decimal("total_discount_price")->nullable()->comment("减免总价")->change();
  32. });
  33. Schema::table('owner_price_operation_items', function (Blueprint $table) {
  34. $table->integer("discount_price")->nullable()->comment("减免单价")->change();
  35. });
  36. }
  37. }