Files
lara-bermite/database/migrations/2023_09_17_204012_create_locations_table.php
2023-09-24 11:19:58 +02:00

31 lines
690 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('locations', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(\App\Models\User::class)->constrained();
$table->double('longitude');
$table->double('latitude');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('locations');
}
};