2026_05_18_000001_add_keno_to_issues.php 879 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. if (Schema::hasTable('issues') && !Schema::hasColumn('issues', 'keno')) {
  14. Schema::table('issues', function (Blueprint $table) {
  15. $table->text('keno')->nullable()->comment('PlayNow官方20个源头号码');
  16. });
  17. }
  18. }
  19. /**
  20. * Reverse the migrations.
  21. *
  22. * @return void
  23. */
  24. public function down()
  25. {
  26. if (Schema::hasTable('issues') && Schema::hasColumn('issues', 'keno')) {
  27. Schema::table('issues', function (Blueprint $table) {
  28. $table->dropColumn('keno');
  29. });
  30. }
  31. }
  32. };