STRAWBERRY
Database services defined inside Docker Compose applications had no way to configure or run scheduled backups. Every service-type deployment had this feature through ServiceDatabase, but Application buildpack deployments were left out entirely — the service_id FK on service_databases had no Application equivalent.
This adds end-to-end backup support for compose-app database services:
service_id nullable and adds application_id FK so ServiceDatabase can be parented by either a Service or an Application (XOR enforced with a CHECK constraint on PostgreSQL)parseDockerComposeFile() creates ServiceDatabase rows linked to the application when it encounters database images in a compose appServiceDatabase row and associated scheduled backup records are deleted — prevents phantom backup jobs from runningDatabaseBackupJob defers execution (re-queues after 5 min via release(300)) when the parent application is actively deployingDatabaseBackups and dedicated route expose the existing scheduled-backup UI for compose-app databasesApplication general settings — Databases section:

Scheduled Backups page for a compose-app database:


If AI was used:
ServiceDatabase and DatabaseBackupJob and was manually verified.Added Pest feature tests in tests/Feature/ApplicationComposeDatabaseBackupsTest.php:
ServiceDatabase row is created with the correct application_idRace guard tested by mocking isDeploymentInprogress() returning true and asserting the job calls release(300) instead of running.
[!IMPORTANT]
- I have read and understood the contributor guidelines. If I have failed to follow any guideline, I understand that this PR may be closed without review.
- I have searched existing issues and pull requests (including closed ones) to ensure this isn’t a duplicate.
- I have tested all the changes thoroughly with a local development instance of Coolify and I am confident that they will work as expected when a maintainer tests them.
/claim #7528
Enkae
@enkae-code
Ilias Ism
@me