Recaje-New/database/migrations/2025_04_26_151736_create_ca...

37 lines
945 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('cafes', function (Blueprint $table) {
$table->id();
$table->string('nama');
$table->string('lokasi');
$table->boolean('wifi')->default(false);
$table->string('jarak_kampus');
$table->text('fasilitas');
$table->string('harga');
$table->string('gambar')->nullable();
$table->decimal('latitude', 10, 7)->nullable();
$table->decimal('longitude', 10, 7)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cafes');
}
};