1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-03-22 01:04:04 +00:00
tenancy/assets/migrations/2019_09_15_000010_create_tenants_table.php
IlyasMohetna c7809a2ad0
Change tenants.id column type from string to uuid
Updated the tenants migration to use $table->uuid('id')->primary()
instead of $table->string('id')->primary() to properly support UUID-based
tenant identification and ensure consistency with Stancl Tenancy expectations.
2026-02-17 21:43:44 +01:00

37 lines
723 B
PHP

<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(): void
{
Schema::create('tenants', function (Blueprint $table) {
$table->uuid('id')->primary();
// your custom columns may go here
$table->timestamps();
$table->json('data')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down(): void
{
Schema::dropIfExists('tenants');
}
};