2026_04_19_062617_create_applications_table.php 883 B

123456789101112131415161718192021222324252627282930313233
  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::create('applications', function (Blueprint $table) {
  13. $table->id();
  14. $table->foreignId('user_id')->constrained()->onDelete('cascade');
  15. $table->string('course_name');
  16. $table->date('date');
  17. $table->enum('payment', ['cash', 'transfit']);
  18. $table->enum('status', ['new', 'continue', 'end'])->default('new');
  19. $table->text('review')->nullable();
  20. $table->timestamps();
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. */
  26. public function down(): void
  27. {
  28. Schema::dropIfExists('applications');
  29. }
  30. };