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:
parent
ca8baf9a6d
commit
a166de2ef6
3 changed files with 2 additions and 2 deletions
35
assets/migrations/2019_09_15_000020_create_domains_table.php
Normal file
35
assets/migrations/2019_09_15_000020_create_domains_table.php
Normal 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');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue