You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(postgres): versioned extension upgrades with CI-gated migration scripts (#45)
Make the PostgreSQL extension version derive from CLOUDSYNC_VERSION
(MAJOR.MINOR), ship per-release upgrade scripts under
src/postgresql/migrations/ so existing deployments can run
ALTER EXTENSION cloudsync UPDATE, and add a CI check that fails when
a release is missing its migration script or accidentally drifts the
SQL surface in a PATCH release.
Before this change, default_version was pinned to '1.0' across all
17 releases, no upgrade scripts existed, and a SQL-changing release
could silently break users by leaving pg_extension.extversion stale
while cloudsync.so loaded new bindings.
User-facing impact:
- PATCH (e.g. 1.0.16 → 1.0.17): swap the binary, no ALTER EXTENSION
- MINOR/MAJOR (e.g. 1.0.x → 1.1.0): one ALTER EXTENSION cloudsync UPDATE per database
Documented in README "Versioning", both PG quickstarts ("Upgrading
a later release"), and src/postgresql/migrations/README.md.
No CLOUDSYNC_VERSION bump in this PR — pure build/CI infrastructure.
This project follows [semver](https://semver.org/). The single source of truth is `CLOUDSYNC_VERSION` in `src/cloudsync.h`; all packaged artifacts (NPM, Maven, pub.dev, Swift, Docker, native tarballs) inherit this version. PATCH releases never alter the exposed API — they ship bug fixes, performance improvements, and internal changes only.
218
+
219
+
The PostgreSQL extension differs only in how it surfaces the version: its catalog version (`default_version` / `installed_version`) exposes `MAJOR.MINOR` only, so PATCH releases are transparent binary upgrades and only MINOR/MAJOR releases need `ALTER EXTENSION cloudsync UPDATE`. The `cloudsync_version()` SQL function always reports the full semver of the loaded `.so`. See the [PostgreSQL upgrade docs](docs/postgresql/quickstarts/postgres.md#upgrading-a-later-release) for the user-facing procedure.
220
+
215
221
## License
216
222
217
223
This project is licensed under the [Elastic License 2.0](./LICENSE.md). For production or managed service use, [contact SQLite Cloud, Inc](mailto:info@sqlitecloud.io) for a commercial license.
0 commit comments