Initial commit

This commit is contained in:
Ronald Huynen
2026-03-23 21:37:59 +01:00
commit 2547717edb
2193 changed files with 972171 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?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('calls', function (Blueprint $table) {
$table->id();
$table->morphs('callable');
$table->unsignedBigInteger('tag_id')->nullable();
$table->foreign('tag_id')->references('tag_id')->on('taggable_tags')->nullOnDelete();
$table->unsignedBigInteger('location_id')->nullable();
$table->foreign('location_id')->references('id')->on('locations')->nullOnDelete();
$table->dateTime('from');
$table->dateTime('till')->nullable();
$table->timestamps();
$table->softDeletes();
});
Schema::create('call_translations', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('call_id');
$table->foreign('call_id')->references('id')->on('calls')->cascadeOnDelete();
$table->string('locale', 5);
$table->text('content')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('call_translations');
Schema::dropIfExists('calls');
}
};