feat: introduce multi-tenancy by adding a structures table, structure_id to key models, and updating seeders for structure management.

This commit is contained in:
jeremy bayse
2026-02-21 20:38:40 +01:00
parent 6a3de5847d
commit abca346b3e
7 changed files with 122 additions and 40 deletions

View File

@@ -0,0 +1,31 @@
<?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('structures', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('slug')->unique();
$table->string('domain')->nullable()->unique();
$table->boolean('is_active')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('structures');
}
};