clockworklabs/SpacetimeDB · info · anyhow::Error
Aborting because major version upgrade was not accepted.
Error message
Aborting because major version upgrade was not accepted.
What it means
Publishing a 2.x module over a 1.x database is a one-way major version upgrade. The CLI requires typing exactly 'upgrade' at the prompt (after pointing at the upgrade notes); any other input — 'yes', 'y', or empty — aborts the publish before anything changes (publish.rs:367).
Source
Thrown at crates/cli/src/subcommands/publish.rs:367
println!();
println!("WARNING: Once you publish you cannot revert back to version 1.0.");
println!();
if skip_prompt {
return Ok(());
}
let mut input = String::new();
print!("Please type 'upgrade' to accept this change: ");
let mut stdout = std::io::stdout();
std::io::Write::flush(&mut stdout)?;
std::io::stdin().read_line(&mut input)?;
if input.trim() == "upgrade" {
return Ok(());
}
anyhow::bail!("Aborting because major version upgrade was not accepted.");
}
pub async fn exec(config: Config, args: &ArgMatches) -> Result<(), anyhow::Error> {
exec_with_options(config, args, false, None).await
}
/// This function can be used when calling publish programatically rather than straight from the
/// CLI, like we do in `spacetime dev`. When calling from `spacetime dev` we don't want to display
/// information about using the `spacetime.json` file as it's already announced as part of the
/// `dev` command
pub async fn exec_with_options(
mut config: Config,
args: &ArgMatches,
quiet_config: bool,
pre_loaded_config: Option<&LoadedConfig>,
) -> Result<(), anyhow::Error> {
// Build schema
let cmd = cli();View on GitHub (pinned to 524b4487d9)
Solutions
- Re-run the publish and type exactly: upgrade
- First read the linked upgrade notes (https://spacetimedb.com/docs/upgrade) — the upgrade cannot be reverted to 1.0
- If the upgrade was not intended, keep the module on 1.x or publish to a fresh database name
- For automation, pre-plan the interactive step or schedule the upgrade deliberately
Example fix
// before (aborted) Please type 'upgrade' to accept this change: yes // after Please type 'upgrade' to accept this change: upgrade
Defensive patterns
Strategy: validation
Validate before calling
# automation must expect the literal word, not y/n printf 'upgrade\n' | spacetime publish mydb # only when the upgrade is intended
Try / catch
if ! spacetime publish mydb; then echo 'publish not confirmed; database untouched (still v1)' >&2 fi
Prevention
- Read the upgrade notes URL before typing upgrade
- Treat 1.x-to-2.x publishes as planned maintenance, not routine deploys
- Type exactly 'upgrade' — 'yes' and 'y' abort
When it happens
Trigger: During `spacetime publish` over an existing v1 database with a v2 module, typing anything other than exactly `upgrade` at the 'Please type upgrade' prompt.
Common situations: Assuming y/n semantics; aborting intentionally after reading the irreversibility warning; CI pipelines stumbling into an interactive prompt; not having read the upgrade notes yet.
Related errors
- Aborted.
- Publish aborted by user.
- Publishing aborted by user
- Manual database migrations are not yet implemented
- Aborted.
AI-assisted analysis of clockworklabs/SpacetimeDB@524b4487d9 (2026-08-16).
Data as JSON: /api/errors/5e5ed813a2ea6f6a.
Report an issue: GitHub.