Add tenant_id to photos table migration to fix DemoPhotosSeeder error (missing column in Multi-Tenancy setup). Update migration to include foreign key for isolation.

This commit is contained in:
2025-09-17 20:40:54 +02:00
parent 31991b7e63
commit 0ad4b7d20b
2 changed files with 56 additions and 0 deletions

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('events', function (Blueprint $table) {
$table->string('status')->default('draft')->after('is_active');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('events', function (Blueprint $table) {
$table->dropColumn('status');
});
}
};

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('photos', function (Blueprint $table) {
//
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('photos', function (Blueprint $table) {
//
});
}
};