1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 14:54:03 +00:00
tenancy/assets/migrations/2019_09_15_000010_create_tenants_table.php
Abraham Brookes e596eaaaa6
Update 2019_09_15_000010_create_tenants_table.php
just added a comment to clarify how to use these custom columns on the tenant model
2021-03-22 11:30:05 +10:00

37 lines
803 B
PHP

<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTenantsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(): void
{
Schema::create('tenants', function (Blueprint $table) {
$table->string('id')->primary();
// your custom columns may go here - remember to add these to your tenant model by using getCustomColumns
$table->timestamps();
$table->json('data')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down(): void
{
Schema::dropIfExists('tenants');
}
}