Repository navigation
[codex] Adopt Goose for migration management - #62
Merged
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughMigration handling is moved to Goose SQL files under ChangesGoose migration tooling and runtime wiring
Sequence Diagram(s)sequenceDiagram
participant Operator
participant Makefile
participant cmd_silo_main
participant internal_database_migrate
participant Goose
participant PostgreSQL
Operator->>Makefile: make migrate-status / make migrate-up
Makefile->>cmd_silo_main: go run ./cmd/silo/ with flags
cmd_silo_main->>internal_database_migrate: MigrationStatuses or RunMigrations
internal_database_migrate->>Goose: create provider, session lock, status/up
Goose->>PostgreSQL: read/write goose_db_version and apply SQL
Goose-->>internal_database_migrate: statuses / completion
internal_database_migrate-->>cmd_silo_main: formatted result or success
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
Quick104
marked this pull request as ready for review
June 7, 2026 03:51
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Quick104
added a commit
to thezak48/silo-server
that referenced
this pull request
Jun 7, 2026
Quick104
added a commit
that referenced
this pull request
Jun 11, 2026
Quick104
added a commit
that referenced
this pull request
Jun 17, 2026
Quick104
added a commit
that referenced
this pull request
Jun 17, 2026
4 tasks done
Quick104
added a commit
that referenced
this pull request
Nov 5, 2026
…changes The SDK commit merges the final heads of Silo-Server/silo-plugin-sdk #57-#62: the event catalog, scoped host API keys, notification channels, conditional instance state writes, default task schedules and host viewer headers. Plugin event names now need a publisher and an event name; every name the server uses already has both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 18, 2026
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.
Summary
migrations/sql/while preserving numeric versions for existing installs.public.goose_db_versionfrom legacypublic.schema_versionsbefore applying or reporting migration status.Why
The current paired-file custom runner is fragile under parallel PRs and makes long-term migration management harder. Goose gives us a standard migration engine, parser, state table, locking support, and timestamped migration creation while keeping existing installs compatible.
Existing Install Behavior
Existing numeric migrations intentionally stay numeric so legacy
schema_versions.versionrows map directly into Goose versions. New migrations must use timestamp filenames viamake migrate-create NAME=....Validation
make migrate-validatego test ./internal/database ./internal/catalogseed ./cmd/silo ./migrationsmake verify-local-pathsCI=true make buildgit diff --cached --checkgo run ./cmd/silo --env '' --migrate-onlyagainst a throwaway database and verified 157 migration files plus Goose version 0 were applied (count=158,max(version_id)=183).schema_versionsrows, ran--migrate-only, verifiedgoose_db_versionhad all legacy versions plus version 0 (count=158,max(version_id)=183), verified zero missing legacy mappings, verifiedschema_versionsremained, and verified representative app tables were not created, proving old SQL was not replayed.AI Use
Implemented with Codex.