File: /home/posscale/www/printmanager/database/migrations/2025_02_20_105531_add_tenancy_fields.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('tenants', function (Blueprint $table) {
$table->boolean('tenancy_create_database')->after('reseller_name')->default(0);
$table->string('tenancy_db_name')->after('tenancy_create_database')->default('');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('tenants', function (Blueprint $table) {
$table->dropColumn('tenancy_create_database');
$table->dropColumn('tenancy_db_name');
});
}
};