Initialize test schema versions#10790
Open
stephanos wants to merge 14 commits into
Open
Conversation
7 tasks
stephanos
commented
Jun 22, 2026
| } | ||
| }() | ||
| err = db.CreateDatabase(s.cfg.DatabaseName) | ||
| db := s.newAdminDB(sqlplugin.DbKindUnknown, &cfg2) |
stephanos
commented
Jun 22, 2026
| } | ||
| s.LoadSchema(path.Join(schemaDir, "temporal", "schema.sql")) | ||
| s.LoadSchema(path.Join(schemaDir, "visibility", "schema.sql")) | ||
| s.LoadSchemaVersion() |
Contributor
Author
There was a problem hiding this comment.
This is the main change 2/2
stephanos
commented
Jun 22, 2026
| } | ||
|
|
||
| s.LoadSchema(path.Join(schemaDir, "temporal", "schema.cql")) | ||
| s.LoadSchemaVersion() |
Contributor
Author
There was a problem hiding this comment.
This is the main change 1/2
stephanos
commented
Jun 22, 2026
| writeSchemaVersionCQL = `INSERT into schema_version(keyspace_name, creation_time, curr_version, min_compatible_version) VALUES (?,?,?,?)` | ||
|
|
||
| writeSchemaUpdateHistoryCQL = `INSERT into schema_update_history(year, month, update_time, old_version, new_version, manifest_md5, description) VALUES(?,?,?,?,?,?,?)` | ||
| ) |
Contributor
Author
There was a problem hiding this comment.
^ these are defined in temporal/tools/cassandra/cqlclient.go but there's no precedence for re-use there so we copy them here; the SQL variants do the same
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
Initialize schema-version metadata for SQL & Cassandra test databases.
Why
We're moving away from the onebox fx graph to use the production graph in
temporal.NewServerFx; and it needs the schema version metadata to be present or it fails to start.