diff --git a/.dockerignore b/.dockerignore index 8484fd9e16..e65141e232 100644 --- a/.dockerignore +++ b/.dockerignore @@ -31,7 +31,9 @@ docker/coolify-terminal/node_modules /storage/app/ssh/mux /storage/app/tmp /storage/app/debugbar -/storage/logs -/storage/pail +/storage/logs/* +!/storage/logs/.gitignore +/storage/pail/* +!/storage/pail/.gitignore /storage/framework/** !/storage/framework/**/.gitignore diff --git a/database/migrations/2026_10_28_211105_add_indexes_for_team_deployments_and_docker_cleanup_history.php b/database/migrations/2026_10_28_211105_add_indexes_for_team_deployments_and_docker_cleanup_history.php new file mode 100644 index 0000000000..d8f4b66752 --- /dev/null +++ b/database/migrations/2026_10_28_211105_add_indexes_for_team_deployments_and_docker_cleanup_history.php @@ -0,0 +1,55 @@ +index('environment_id', 'idx_applications_environment_id_all'); + }); + } + + if (! Schema::hasIndex('docker_cleanup_executions', 'idx_docker_cleanup_executions_server_created_at')) { + Schema::table('docker_cleanup_executions', function (Blueprint $table) { + $table->index(['server_id', 'created_at'], 'idx_docker_cleanup_executions_server_created_at'); + }); + } + } + + public function down(): void + { + if (DB::getDriverName() === 'pgsql') { + DB::statement('DROP INDEX CONCURRENTLY IF EXISTS idx_docker_cleanup_executions_server_created_at'); + DB::statement('DROP INDEX CONCURRENTLY IF EXISTS idx_applications_environment_id_all'); + + return; + } + + if (Schema::hasIndex('docker_cleanup_executions', 'idx_docker_cleanup_executions_server_created_at')) { + Schema::table('docker_cleanup_executions', function (Blueprint $table) { + $table->dropIndex('idx_docker_cleanup_executions_server_created_at'); + }); + } + + if (Schema::hasIndex('applications', 'idx_applications_environment_id_all')) { + Schema::table('applications', function (Blueprint $table) { + $table->dropIndex('idx_applications_environment_id_all'); + }); + } + } +}; diff --git a/database/migrations/2026_10_28_212642_add_indexes_for_server_settings_and_team_membership_lookups.php b/database/migrations/2026_10_28_212642_add_indexes_for_server_settings_and_team_membership_lookups.php new file mode 100644 index 0000000000..5a456e6c3a --- /dev/null +++ b/database/migrations/2026_10_28_212642_add_indexes_for_server_settings_and_team_membership_lookups.php @@ -0,0 +1,55 @@ +index('server_id', 'idx_server_settings_server_id'); + }); + } + + if (! Schema::hasIndex('team_user', 'idx_team_user_user_id')) { + Schema::table('team_user', function (Blueprint $table) { + $table->index('user_id', 'idx_team_user_user_id'); + }); + } + } + + public function down(): void + { + if (DB::getDriverName() === 'pgsql') { + DB::statement('DROP INDEX CONCURRENTLY IF EXISTS idx_team_user_user_id'); + DB::statement('DROP INDEX CONCURRENTLY IF EXISTS idx_server_settings_server_id'); + + return; + } + + if (Schema::hasIndex('team_user', 'idx_team_user_user_id')) { + Schema::table('team_user', function (Blueprint $table) { + $table->dropIndex('idx_team_user_user_id'); + }); + } + + if (Schema::hasIndex('server_settings', 'idx_server_settings_server_id')) { + Schema::table('server_settings', function (Blueprint $table) { + $table->dropIndex('idx_server_settings_server_id'); + }); + } + } +};