1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 14:14:04 +00:00

User impersonation

This commit is contained in:
Samuel Štancl 2020-05-15 07:30:57 +02:00
parent 52476d6298
commit 10a5b80d44
9 changed files with 432 additions and 2 deletions

View file

@ -16,7 +16,7 @@ class CreateTenantsTable extends Migration
public function up(): void
{
Schema::create('tenants', function (Blueprint $table) {
$table->string('id', 36)->primary(); // 36 characters is the default uuid length
$table->string('id')->primary();
// your custom columns may go here

View file

@ -18,7 +18,7 @@ class CreateDomainsTable extends Migration
Schema::create('domains', function (Blueprint $table) {
$table->increments('id');
$table->string('domain', 255)->unique();
$table->string('tenant_id', 36);
$table->string('tenant_id');
$table->timestamps();
$table->foreign('tenant_id')->references('id')->on('tenants')->onUpdate('cascade')->onDelete('cascade');