-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Janus should refuse to start up if it sees an unsupported schema version #1241
Comments
Brandon's comment in #1219 is relevant
|
Creating a `Datastore` now checks the version of the most recently applied migration script against an array of supported versions compiled into Janus. If the current schema is not supported, `Datastore::new` returns an error. Resolves #1241
Creating a `Datastore` now checks the version of the most recently applied migration script against an array of supported versions compiled into Janus. If the current schema is not supported, `Datastore::new` returns an error. Resolves #1241
Creating a `Datastore` now checks the version of the most recently applied migration script against an array of supported versions compiled into Janus. If the current schema is not supported, `Datastore::new` returns an error. Also adds a configuration option to disable this new feature. This is needed because the Janus interop binaries apply schema migrations at startup, after being handed control by `janus_main`. Resolves #1241
Creating a `Datastore` now checks the version of the most recently applied migration script against an array of supported versions compiled into Janus. If the current schema is not supported, `Datastore::new` returns an error. Also adds a configuration option to disable this new feature. This is needed because the Janus interop binaries apply schema migrations at startup, after being handed control by `janus_main`. Resolves #1241
For posterity: #1277 was a part of this issue, too. |
As of #1218, we now have versioned SQL schema migration scripts. Deploying a migration from schema n to n+1 will involve deploying a Janus that can support both schema versions and then applying the migration to schema n+1. To make this safer, any Janus version should have a list or range of supported schema versions compiled into it so that at startup, it can query the
_sqlx_migrations
table to see what the current version is and refuse to startup if it doesn't recognize it. This reduces the risk of Janus corrupting data.The text was updated successfully, but these errors were encountered: