fixed migration

This commit is contained in:
Codex Agent
2025-11-15 21:33:20 +01:00
parent 9e707ce618
commit e1e5549a91

View File

@@ -12,10 +12,10 @@ return new class extends Migration
public function up(): void
{
Schema::table('tenants', function (Blueprint $table) {
if (!Schema::hasColumn('tenants', 'subscription_status')) {
$table->enum('subscription_status', ['free', 'active', 'suspended', 'expired'])->default('free')->after('subscription_tier');
if (! Schema::hasColumn('tenants', 'subscription_status')) {
$table->enum('subscription_status', ['free', 'active', 'suspended', 'expired'])->default('free');
}
if (!Schema::hasColumn('tenants', 'subscription_expires_at')) {
if (! Schema::hasColumn('tenants', 'subscription_expires_at')) {
$table->timestamp('subscription_expires_at')->nullable()->after('subscription_status');
}
});
@@ -30,4 +30,4 @@ return new class extends Migration
$table->dropColumn(['subscription_status', 'subscription_expires_at']);
});
}
};
};