Skip to content

Conversation

@Rene-Roscher
Copy link

Description

Adds ability to disable Database Hosts to exclude them from automatic database deployment while keeping existing databases fully functional.

Motivation

Database servers can fill up or require maintenance. This feature allows administrators to disable hosts temporarily (e.g., when running out of space) without affecting existing databases or requiring host deletion.

Changes

Database

  • Migration adds enabled boolean column (default: true) to database_hosts table
  • All existing hosts are automatically enabled

Backend

  • DeployServerDatabaseService: Filters disabled hosts from automatic selection
  • DatabaseHost model: Added enabled field (fillable, casts, validation)
  • HostCreationService: New hosts default to enabled
  • DatabaseHostFormRequest: Handles checkbox-to-boolean conversion

Admin UI

  • Host List: Status column with Enabled/Disabled badge, checkbox in create modal
  • Host Detail: Toggle checkbox, warning when disabling hosts with existing databases

API

  • DatabaseHostTransformer: Includes enabled field in response

Behavior

  • Client API: Disabled hosts excluded from automatic selection
  • Admin API: Can still explicitly use disabled hosts (flexibility)
  • Existing databases: Continue to work on disabled hosts
  • New databases: Cannot be created on disabled hosts

Backward Compatibility

No breaking changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant