1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-13 02:24:03 +00:00

Tenant-specific connections, some work to get tests running

This commit is contained in:
Samuel Štancl 2019-09-15 17:44:26 +02:00
parent e25a01a997
commit c65b6839ff
13 changed files with 162 additions and 67 deletions

View 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');
}
}