123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- declare(strict_types=1);
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateTenantsTable extends Migration
- {
- /**
- * Get the migration connection name.
- */
- public function getConnection(): ?string
- {
- return config('tenancy.database.central_connection');
- }
- /**
- * 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
- $table->timestamps();
- $table->json('data')->nullable();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down(): void
- {
- Schema::dropIfExists('tenants');
- }
- }
|