2024_07_28_122517 change_asset_id_nullable_requirements.php 658 B

123456789101112131415161718192021222324252627282930
  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. /**
  8. * Run the migrations.
  9. */
  10. public function up(): void
  11. {
  12. Schema::table('requirements', function (Blueprint $table) {
  13. //
  14. $table->integer('asset_id')->nullable()->change();
  15. });
  16. }
  17. /**
  18. * Reverse the migrations.
  19. */
  20. public function down(): void
  21. {
  22. Schema::table('requirements', function (Blueprint $table) {
  23. //
  24. $table->integer('asset_id')->change();
  25. });
  26. }
  27. };