Files
glastree/database/migrations/2024_01_01_000001_create_tenants_table.php
T
2026-06-17 19:13:40 +02:00

31 lines
797 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
if (Schema::hasTable('tenants')) {
return;
}
Schema::create('tenants', function (Blueprint $table) {
$table->id();
$table->string('nome');
$table->string('slug')->unique();
$table->string('email')->nullable();
$table->string('telefono')->nullable();
$table->text('note')->nullable();
$table->boolean('attivo')->default(true);
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('tenants');
}
};