add migrate

This commit is contained in:
karimalden 2024-07-29 14:52:14 +03:00
parent 15d5dfa593
commit 93ca3613ac
2 changed files with 29 additions and 1 deletions

View File

@ -17,7 +17,7 @@ public function up(): void
$table->string('phone'); $table->string('phone');
$table->string('email'); $table->string('email');
$table->text('message'); $table->text('message');
$table->string('attachment')->nullable(); $table->string('attachment');
$table->timestamps(); $table->timestamps();
}); });
} }

View File

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('quotations', function (Blueprint $table) {
$table->string('attachment')->nullable()->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('quotations', function (Blueprint $table) {
$table->string('attachment')->nullable(false)->change();
});
}
};