Kasir/database/migrations/2025_08_25_061705_create_fotos_table.php
2025-08-27 16:32:02 +07:00

30 lines
649 B
PHP

<?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::create('fotos', function (Blueprint $table) {
$table->id();
$table->foreignId('id_produk')->constrained('produks')->cascadeOnDelete();
$table->string('url');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('fotos');
}
};