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

Rename migration stubs so they show next to each other (#127)

This commit is contained in:
Chris Brown 2019-09-25 02:07:01 -04:00 committed by Samuel Štancl
parent ca8baf9a6d
commit a166de2ef6
3 changed files with 2 additions and 2 deletions

View file

@ -0,0 +1,35 @@
<?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); // 36 characters is the default uuid length
$table->string('domain', 255)->unique(); // don't change this
$table->foreign('tenant_id')->references('id')->on('tenants')->onUpdate('cascade')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('domains');
}
}