mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 16:14:02 +00:00
Fix #998, properly replace ALL tenant_id literals
This commit is contained in:
parent
8a00a105d0
commit
2a39b0526a
11 changed files with 35 additions and 22 deletions
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Stancl\Tenancy\Tenancy;
|
||||
|
||||
class CreateTenantUserImpersonationTokensTable extends Migration
|
||||
{
|
||||
|
|
@ -17,13 +18,13 @@ class CreateTenantUserImpersonationTokensTable extends Migration
|
|||
{
|
||||
Schema::create('tenant_user_impersonation_tokens', function (Blueprint $table) {
|
||||
$table->string('token', 128)->primary();
|
||||
$table->string('tenant_id');
|
||||
$table->string(Tenancy::tenantKeyColumn());
|
||||
$table->string('user_id');
|
||||
$table->string('auth_guard');
|
||||
$table->string('redirect_url');
|
||||
$table->timestamp('created_at');
|
||||
|
||||
$table->foreign('tenant_id')->references('id')->on('tenants')->onUpdate('cascade')->onDelete('cascade');
|
||||
$table->foreign(Tenancy::tenantKeyColumn())->references('id')->on('tenants')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue