diff --git a/database/migrations/2025_11_14_120000_add_performance_indexes_to_tables.php b/database/migrations/2025_11_14_120000_add_performance_indexes_to_tables.php index 3e9c0c9..5cdbe7e 100644 --- a/database/migrations/2025_11_14_120000_add_performance_indexes_to_tables.php +++ b/database/migrations/2025_11_14_120000_add_performance_indexes_to_tables.php @@ -97,10 +97,6 @@ return new class extends Migration $table->index(['is_activated', 'created_at'], 'activation_keys_activated_created_at_index'); }); - Schema::table('settings', function (Blueprint $table): void { - $table->index('key', 'settings_key_index'); - }); - Schema::table('metas', function (Blueprint $table): void { $table->index('key', 'metas_key_index'); }); @@ -197,12 +193,8 @@ return new class extends Migration $table->dropIndex('activation_keys_activated_created_at_index'); }); - Schema::table('settings', function (Blueprint $table): void { - $table->dropIndex('settings_key_index'); - }); - Schema::table('metas', function (Blueprint $table): void { $table->dropIndex('metas_key_index'); }); } -}; \ No newline at end of file +}; diff --git a/database/migrations/2025_11_20_193234_create_plan_usages_table.php b/database/migrations/2025_11_20_193234_create_plan_usages_table.php index 19e7e3d..7fb4195 100644 --- a/database/migrations/2025_11_20_193234_create_plan_usages_table.php +++ b/database/migrations/2025_11_20_193234_create_plan_usages_table.php @@ -23,7 +23,7 @@ return new class extends Migration $table->json('metadata')->nullable(); $table->timestamps(); - $table->unique(['user_id', 'plan_feature_id', 'usage_type', 'period_start']); + $table->unique(['user_id', 'plan_feature_id', 'usage_type', 'period_start'], 'plan_usage_unique'); $table->index(['user_id', 'period_start']); $table->index(['plan_feature_id', 'period_start']); });