refactor(db): remove deployment compatibility paths#361
Merged
Conversation
The database optimization plan still described production migration choreography that does not match an undeployed project. Replace those sections with pre-deployment schema guidance and validation-focused Citus planning. The plan now points toward clean target schema changes before real customer data exists.
Startup schema setup carried old-data repair logic even though the project has not been deployed with customer data. Replace the migration wrapper with a direct schema sync path and remove legacy backfill and column rewrite tests. Database startup now initializes the current target schema without carrying historical compatibility code.
Publication status aliases kept old naming alive after the API contract moved to draft, succeeded, and cancelled values. Remove the alias constants and switch services plus tests to the canonical publication status names. Publishing code now uses one status vocabulary without compatibility indirection.
Multiple API and worker processes can call schema initialization during the same rollout. Wrap the clean schema sync path in a Postgres transaction advisory lock without restoring legacy data repair logic. Fresh database startup now avoids concurrent AutoMigrate and index creation races.
The non-production Redis Cluster keeps TLS client authentication enabled for app-facing traffic. Teach backend, browser-worker, and collab-service Redis clients to load client certificate and key files, then expose the paths in Kubernetes config and docs. Cluster cutover can keep server-side mTLS without breaking app Redis clients.
The non-production Redis Cluster backup wrote topology files while dataset files stayed on pod PVCs. Keep the snapshot trigger, then export RDB files from primary nodes into the backup PVC and update the drill notes. Restore drills now have Redis data artifacts alongside Cluster topology metadata.
619f72a to
3c97694
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Description
Implementation Approach
syncSchema, keeping AutoMigrate and required indexes while deleting legacy backfills and column rewrites.draft,succeeded, andcancelledconstants.Testing
cd backend && go test ./...passed.