2019_09_15_000010_create_tenants_table.php 732 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. declare(strict_types=1);
  3. use Illuminate\Database\Migrations\Migration;
  4. use Illuminate\Database\Schema\Blueprint;
  5. use Illuminate\Support\Facades\Schema;
  6. class CreateTenantsTable extends Migration
  7. {
  8. /**
  9. * Run the migrations.
  10. *
  11. * @return void
  12. */
  13. public function up(): void
  14. {
  15. Schema::create('tenants', function (Blueprint $table) {
  16. $table->string('id')->primary();
  17. // your custom columns may go here
  18. $table->timestamps();
  19. $table->json('data')->nullable();
  20. });
  21. }
  22. /**
  23. * Reverse the migrations.
  24. *
  25. * @return void
  26. */
  27. public function down(): void
  28. {
  29. Schema::dropIfExists('tenants');
  30. }
  31. }