mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 14:14:04 +00:00
Tenant-specific connections, some work to get tests running
This commit is contained in:
parent
e25a01a997
commit
c65b6839ff
13 changed files with 162 additions and 67 deletions
|
|
@ -16,10 +16,8 @@ class CreateTenantsTable extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::create('tenants', function (Blueprint $table) {
|
||||
$table->string('uuid', 36)->primary(); // don't change this
|
||||
$table->string('domain', 255)->index(); // don't change this
|
||||
|
||||
// your indexed columns go here
|
||||
$table->string('id', 36)->primary(); // 36 characters is the default uuid length
|
||||
// your custom, indexed columns go here
|
||||
|
||||
$table->json('data');
|
||||
});
|
||||
|
|
|
|||
33
assets/migrations/2019_09_15_000000_create_domains_table.php
Normal file
33
assets/migrations/2019_09_15_000000_create_domains_table.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDomainsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('domains', function (Blueprint $table) {
|
||||
$table->string('tenant_id', 36)->primary(); // 36 characters is the default uuid length
|
||||
$table->string('domain', 255)->index(); // don't change this
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('domains');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue