28 lines
737 B
PHP
28 lines
737 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::create('documents', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('name');
|
|
$table->string('file_name')->nullable();
|
|
$table->text('description')->nullable();
|
|
$table->string('url');
|
|
$table->integer('position');
|
|
$table->foreignId('admission_id')->constrained('admissions');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('documents');
|
|
}
|
|
};
|