mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 22:34:03 +00:00
33 lines
711 B
PHP
33 lines
711 B
PHP
<?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');
|
|
}
|
|
}
|