Versioning, Release Policy, and Upstream Standards
This document defines the versioning policy, release standards, breaking-change management, database and configuration migration strategies, and maintainer expectations for the wedding_website project.
1. Semantic Versioning Policy
The project strictly follows Semantic Versioning 2.0.0 (MAJOR.MINOR.PATCH) to communicate the impact of releases to downstream adopters:
| Version Component | Increment Rule | Examples & Impact on Downstream Adopters |
|---|---|---|
MAJOR (X.0.0) | Incompatible schema changes, removed features, breaking API changes, or non-backwards-compatible configuration schema updates requiring manual migration steps. | Database schema breaking change (e.g. dropping columns/tables), removing a deprecated route or component prop, requiring new mandatory environment variables. |
MINOR (0.Y.0) | New features, backwards-compatible database schema additions (new tables/optional columns with defaults), new optional configuration fields, UI additions. | Adding a new page (e.g., Guestbook), adding optional fields to AppConfig or RegistryItem, adding non-breaking API endpoints. |
PATCH (0.0.Z) | Backwards-compatible bug fixes, security patches, styling fixes, performance improvements, documentation updates. | Fixing a scraper edge case, correcting layout bugs on mobile devices, updating dependencies without API changes. |
2. Release Notes & Changelog Expectations
Every release published to GitHub and logged in CHANGELOG.md must clearly categorize changes into standardized sections. Pushing a v* version tag runs .github/workflows/publish-artifact.yml to promote or build multi-platform GHCR images and then triggers .github/workflows/release.yml (Publish GitHub Release), which extracts the matching version entry (or ## [Unreleased] prior to section cutover) from CHANGELOG.md via scripts/release-integrity.sh and publishes an OIDC-attested GitHub Release containing SHA256SUMS, sbom-index.spdx.json, sbom-amd64.spdx.json, sbom-arm64.spdx.json, and the Track C source archive (wedding-website-<tag>.tar.gz). This allows maintainers and downstream adopters to quickly assess the impact of an upgrade and verify artifact integrity before deploying.
Categorization Standards
Every release entry in CHANGELOG.md MUST include an explicit header indicating whether adopter action is required (Adopter Action Required: Yes | No), followed by these distinct categories (omitting empty categories):
- 🚀 Application Changes: UI improvements, feature additions, bug fixes, client/server refactoring.
- 🗄️ Schema Changes: Prisma database schema updates, new database models, column additions/modifications, and associated migration scripts (
prisma/migrations/). - ⚙️ Configuration Changes: Changes to
AppConfigschema (src/features/content/schemas.ts), feature flags, or environment variables (src/env.ts,.env.example). - 🐳 Deployment & Infrastructure Changes: Updates to Docker configuration (
Dockerfile,docker-compose.yml), CI/CD workflows (.github/workflows/), runtime Node.js requirements, or hosting specifications. - ⚠️ Breaking Changes & Migration Guide: Step-by-step instructions required for adopters upgrading across breaking changes.
Standard Release Note Template
## [1.2.0] - 2026-10-15
> **Adopter Action Required**: Yes (Database migration required)
### 🚀 Application Changes
- Added RSVP status filter in Admin Guest Management dashboard.
- Fixed 3D heart animation stutter on iOS WebKit browsers.
### 🗄️ Schema Changes
- Added `isPlusOne` column with `@default(false)` to `Contributor` model (`prisma/migrations/20261015_add_contributor_plus_one/`).
### ⚙️ Configuration Changes
- Added optional `showAddToCalendar` toggle to `AppConfig` schema.
### 🐳 Deployment & Infrastructure Changes
- Updated Docker base image digest for `node:22-bookworm-slim`.
### ⚠️ Breaking Changes & Migration Guide
- None (All schema changes are backwards-compatible additions with defaults).3. Breaking-Change & Deprecation Policy
To prevent unexpected breakage for downstream forks:
- Migration Instructions Required: Any pull request or release containing a breaking change MUST provide explicit migration instructions in the PR description and release notes.
- Deprecation Windows:
- Before removing or altering an established feature, API route, or component interface, maintainers must flag it as deprecated for at least one MINOR release cycle (or a minimum window of 30 days).
- Code deprecations must be marked using TypeScript
@deprecatedJSDoc annotations and produce runtime warning logs where applicable.
- Database Schema Breaking Changes (
Expand-Migrate-Contract):- Destructive or non-backward-compatible database alterations (such as column/table drops, renames, type changes, or tightening nullability) must follow the three-phase Expand-Migrate-Contract release policy (aligned with
DEPLOYMENT.md,ARCHITECTURE.md, anddocs/upgrading.md):- Phase 1: Expand (Minor Release): Introduce additive, zero-downtime schema changes only—new tables, nullable columns,
DROP NOT NULL,NOT NULLcolumns accompanied by an explicitDEFAULT, dedicated single-statementCREATE INDEX CONCURRENTLY/CREATE UNIQUE INDEX CONCURRENTLYmigration files for pre-existing tables (avoiding table write locks and PostgreSQL error25001from Prisma Migrate's implicit multi-statement transactions), and two-stepNOT VALID+VALIDATE CONSTRAINTrollouts forCHECKandFOREIGN KEYconstraints (UNIQUE USING INDEXfor unique constraints). Automated pre-deployment linting vianpm run lint:migrations(scripts/verify-migration-compatibility.ts) blocks unannotated destructive, locking, orN-1-incompatible SQL in CI and deployment workflows. - Phase 2: Migrate (Transition & Backfill): Deploy application code that dual-reads/dual-writes across old and new schema structures (marking superseded code paths
@deprecated), validate deferred constraints (ALTER TABLE ... VALIDATE CONSTRAINT ...), and backfill existing rows while preservingN-1container rollback safety. - Phase 3: Contract (Subsequent / Major Release): After the deprecation window expires and no active application version queries the obsolete columns or tables, remove deprecated indexes in dedicated single-statement
DROP INDEX CONCURRENTLYfiles and retire obsolete schema structures in a dedicated migration annotated with a statement-scoped-- allow-destructive: <reason>SQL comment (requiring a non-empty<reason>).
- Phase 1: Expand (Minor Release): Introduce additive, zero-downtime schema changes only—new tables, nullable columns,
- Destructive or non-backward-compatible database alterations (such as column/table drops, renames, type changes, or tightening nullability) must follow the three-phase Expand-Migrate-Contract release policy (aligned with
4. Database Migration Strategy
Database migrations manage schema transitions safely across upstream and downstream instances.
- Prisma Migration Files: All database schema changes must be created using Prisma migration CLI (
npm run migrate:dev -- --name <descriptive_name>) and committed underprisma/migrations/. - Association with Releases: Migration folders in
prisma/migrations/are immutable and tied directly to the release commit in which they were introduced. - Local vs. Production Migration Execution: Production pipelines and hosts apply migrations with
npx prisma migrate deployagainstDATABASE_URL(bound inprisma.config.ts, orDATABASE_URL="${POSTGRES_URL_NON_POOLING:-$DATABASE_URL}" env -u POSTGRES_URL_NON_POOLING npx prisma migrate deploybehind transaction-mode poolers; containers invoke./node_modules/.bin/prisma migrate deployoffline), whereasnpm run migrate:deployis reserved for local development environments; seedocs/upgrading.mdfor the canonical environment cascade and host execution tracks. - Automated Compatibility Linting (
npm run lint:migrations):scripts/verify-migration-compatibility.tsinspects every SQL statement, PL/pgSQLDOblock (dollar-quoted and single-quoted, includingCASEbranches),CREATE FUNCTION/CREATE PROCEDUREbody, and dynamicEXECUTEexpression (joining||literals, parsingformat()%placeholders, and rejecting unannotated variableEXECUTE) inprisma/migrations/during local quality gates, PR checks, and zero-install release/rollback workflows:- Destructive DDL & DML: Rejects
DROP TABLE,DROP COLUMN,DROP CONSTRAINT,DROP TYPE,DROP SCHEMA,DROP VIEW,DROP MATERIALIZED VIEW,DROP TRIGGER,DROP FUNCTION,DROP PROCEDURE,DROP SEQUENCE,TRUNCATE, andDELETE FROMunless explicitly authorized for a Phase 3 contract cleanup via statement-scoped-- allow-destructive: <reason>. N-1Breaking Mutations: RejectsRENAME COLUMN,RENAME TO,RENAME VALUE,SET NOT NULL,SET DATA TYPE,DROP DEFAULT,ADD COLUMN ... NOT NULLwithoutDEFAULT,ADD COLUMN ... PRIMARY KEY, andADD GENERATED ALWAYSunless annotated with-- allow-destructive: <reason>.- Zero-Downtime Locking &
CONCURRENTLYTransaction Safety: RequiresCONCURRENTLYonCREATE INDEXandDROP INDEXfor pre-existing tables—each isolated in its own single-statementmigration.sqlfile withoutBEGINso Prisma Migrate never triggers PostgreSQL error25001—and requiresNOT VALIDonCHECKandFOREIGN KEYconstraints referencing pre-existing tables (USING INDEXonUNIQUEconstraints). Non-concurrent indexes and constraints on tables created earlier in the same file pass automatically (includingFOREIGN KEYconstraints strictly between newly created tables), and legacy historical migrations are tracked via a frozen baseline manifest while keeping all destructive checks active.
- Destructive DDL & DML: Rejects
- Non-Destructive Defaults: All new columns in minor (Phase 1 Expand) releases MUST provide a default value (e.g.,
@default(""),@default(false),@default(now())) or be optional (?) so existing database rows andN-1containers operate without data loss or downtime.
5. Configuration Migration & Schema Versioning Strategy
Configuration settings (stored in AppConfig and defined in src/features/content/schemas.ts) must support forward and backward compatibility.
- Zod Schema Defaults: New configuration fields added to
AppConfigSchemamust use Zod defaults (e.g.,.default(true)) or be marked.optional(). - Graceful Parsing Fallbacks: When parsing existing database records that lack new configuration fields, Zod schemas automatically apply default values during request validation without throwing runtime errors.
- Configuration Migrations: If configuration keys are restructured or renamed:
- A database migration or seed handler script must update existing
AppConfigrows in PostgreSQL. - The Zod schema must support fallback transformation from legacy field names to new field names during the transition window.
- A database migration or seed handler script must update existing
6. Supported-Version Policy & Maintainer Guidelines
Maintenance Scope
- Current Major Version: Full support with active feature additions, bug fixes, and security patches.
- Previous Major Version (N-1): Critical security patches and major bug fixes supported for 6 months after a new major release.
Maintainer Checklist for Identifying Action Items
When reviewing PRs and tagging releases, maintainers must check if adopters need to take action:
- [ ] Does this PR alter
prisma/schema.prismaorprisma/migrations/? -> Action Required: Verifynpm run lint:migrationspasses and instruct adopters to apply migrations perdocs/upgrading.md(npx prisma migrate deployin production,./node_modules/.bin/prisma migrate deployin containers, ornpm run migrate:deployin local development). - [ ] Does this PR add or change environment variables in
src/env.tsor.env.example? -> Action Required: Update local.envfiles. - [ ] Does this PR change
AppConfigor content schemas insrc/features/content/schemas.ts? -> Action Required: Review site settings in Admin UI. - [ ] Does this PR update
package.jsondependencies or Node engine versions? -> Action Required: Runnpm ci. - [ ] Does this PR change container setup (
Dockerfile,docker-compose.yml)? -> Action Required: Rebuild container image.
If ANY of these apply, flag the release notes with Adopter Action Required: Yes and document the exact steps in the release notes.