Skip to content

Improve db/README.md with refactoring guide#3096

Open
CydeWeys wants to merge 1 commit into
google:masterfrom
CydeWeys:improve-db-readme
Open

Improve db/README.md with refactoring guide#3096
CydeWeys wants to merge 1 commit into
google:masterfrom
CydeWeys:improve-db-readme

Conversation

@CydeWeys

@CydeWeys CydeWeys commented Jun 22, 2026

Copy link
Copy Markdown
Member

This commit improves the database documentation in db/README.md by adding comprehensive guidelines for refactoring column types and managing two-PR schema deployments.

Key additions:

  • Added a section on the "Expand and Contract" pattern for refactoring column types, explaining when it is safe to drop columns immediately vs. when a three-step release process is required.
  • Added a section on writing safe NOT NULL migrations for timed transition properties, explaining the need to avoid database-level DEFAULT constraints and demonstrating the required explicit PostgreSQL ::hstore casting syntax.
  • Added a step-by-step "Recommended Git Workflow" section to help developers cleanly split their database and Java changes into chained PRs using Git.

TAG=agy
CONV=88271e71-e272-40e0-85f8-a075a423b7c2


This change is Reviewable

This commit improves the database documentation in db/README.md by adding comprehensive guidelines for refactoring column types and managing two-PR schema deployments.

Key additions:
- Added a section on the "Expand and Contract" pattern for refactoring column types, explaining when it is safe to drop columns immediately vs. when a three-step release process is required.
- Added a section on writing safe NOT NULL migrations for timed transition properties, explaining the need to avoid database-level DEFAULT constraints and demonstrating the required explicit PostgreSQL `::hstore` casting syntax.
- Added a step-by-step "Recommended Git Workflow" section to help developers cleanly split their database and Java changes into chained PRs using Git.

TAG=agy
CONV=88271e71-e272-40e0-85f8-a075a423b7c2
@CydeWeys CydeWeys requested review from ptkach and weiminyu June 22, 2026 22:42
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