Repository navigation
EN Clever Going Back
Français · Type: explanation + how-to · Audience: admin · Context: hosted Studio · Status: ready · Applies from: 4.2.3
The Studio Server (hosted team Studio) · contract: experimental · verified by CI (support matrix of 4.4.0, 2026-10-23): Postgres, S3 and Keycloak in CI; Chromium and Firefox (job studio-hosted); WebKit on macOS, by hand only · automated checks: jobs
studio-hosted,studio-install-smoke; CI planstudioHosted; 3 test files · people's passes:studio-hostednot run (#149),studio-collabnot run (#150),studio-previewnot run (#166),studio-assets-hostednot run (#167),studio-mcp-remotenot run (#196),studio-oidc-genericnot run (#197) · known limits:no-schema-downgrade
After an upgrade, going back to the previous version of the Studio Server is sometimes a plain redeploy, and sometimes a restore that loses what was written since. This page says which, why, and what to do in each case.
The Studio Server migrates its database up when it starts, step by step (studio-server/migrations/NNNN.up.sql,
recorded in schema_migrations). The migrations' runner refuses a database newer than every step it knows: an older
server cannot open a database a newer one migrated past it. Each step also has a NNNN.down.sql, and the shared
runner can apply them, but the Studio Server has no command to migrate down: a downgrade of the schema is not a
supported procedure.
Guarantee ·
newer-schema-refused· referenced · scope self-checked by the author (AI), not reviewed On the Bridge's SQLite store, migrating a database whose schema is newer than the Bridge's last migration is refused with an error that says the database is newer than this Bridge knows.
The full message is "the database is at schema N, newer than this Bridge knows (M): upgrade the Bridge". The code
throws it before any step, so nothing changes; the test does not assert that. The Studio Server runs the same runner
(bridge/src/migrations.ts), whose message still says "Bridge".
So there are two cases.
| The upgrade… | Going back is… | What is lost |
|---|---|---|
| added no migration | a redeploy of the previous version | nothing |
| added at least one migration | not possible by redeploy (the old server refuses the newer schema): a restore, with the previous version, of the backup taken before the upgrade, into a new add-on | what was written since that backup, unless the replay can still apply it |
The replay after a restore applies the journal shipped since the backup, as long as each operation continues the head;
it stops at the first that does not (stopped). Whether the operations a newer version wrote replay onto an older
one was never measured; the restore's last line says how far it went.
Verified on: not verified on a live installation. No downgrade was exercised by the reference deployment.
-
If the upgrade added no migration (
git diff --name-only <old tag> <new tag> -- studio-server/migrationsis empty), redeploy the previous version, worker first.clever deploypushes your checkout's commit; an older one is not a fast-forward of what is deployed, so it needs--force:# on your machine, in the engine repository git checkout v4.3.1 clever deploy --alias my-game-worker --force clever deploy --alias my-game-studio --force
- If the old studio does not start and its log says
the database is at schema …, newer than this Bridge knows, the schema cannot go back. Redeploy the new version to serve again, then choose: stay on it, or restore.
- To restore: follow the restore drill with the previous version checked out, the backup taken before the upgrade, and a new PostgreSQL add-on. Then link that add-on to the studio app in place of the old one, and deploy the previous version on it. Members log in again (sessions are not in a backup).
- Keep the upgraded database's add-on until you have checked the result: it is the only copy of what was written between the backup and the switch, if the replay stopped early.
Limit ·
no-schema-downgradeThere is no supported way to migrate the Studio's database down. TheNNNN.down.sqlfiles are kept for the runner's tests; running them by hand on production is not documented, not tested on a hosted Studio, and would leave a database no backup describes.
The owner's engine upgrade of the game (authoring schema 2 → 3) is one revision: the owner's Undo takes it back, as a
new revision (409 if someone wrote one of its files since). The rename of the former web-scumm/… imports (4.3.0) is
written without an undo; a backup taken before is the way back
(Upgrading the engine of a hosted game).
-
A
migrate --downcommand. It would let an older server open the database again, but a down step can drop data the newer version wrote (a new table, the comments of0012for instance), silently. A restore says what it kept and what it dropped. -
Never migrating while the old instance serves. That would mean a stop at every upgrade; the overlap is kept, with
clever stopfirst for the one case that needs it (Upgrading the server).
Going back after a migration costs a restore, a new add-on, a logout of everyone, and possibly the writes since the backup. That is why the backup of the upgrade's step 2, and a drill on the new version, come first.
- The runner:
bridge/src/migrations.ts(ADR 0009 for the Bridge's schema, reused by the Studio Server); the migrations:studio-server/migrations/. - The test behind the guarantee:
tests/bridge-reality-store.test.ts. - Upgrading the server, Restore drill.
Generated publication · publication générée — current documentation · documentation courante: quest'n'click 4.4.0 r1, documentation revision · révision de la documentation 8dc717c69acb62c4742b69c54a7e7dfb620f75d8.
Earlier versions and permalinks · versions précédentes et liens permanents: https://wanoo.github.io/quest-n-click/docs/
An edit made in this wiki is overwritten at the next publication · une modification faite dans ce wiki est écrasée à la publication suivante.
Edit the source · Modifier la source · Report an error · Signaler une erreur
Index (6)
Start (6)
Play (9)
Install (17)
- Requirements
- Install from the release archive
- Install from npm, once published
- Install from the repository to work on the engine
- doctor: checking your machine
- Image toolchain
- Audio toolchain: ffmpeg, fluidsynth, Furnace, uv
- Upgrade
- Upgrade notes: 4.4
- Upgrade notes: 4.3
- Upgrade notes: 4.2
- Upgrade notes: 4.1
- Upgrade notes: v3
- Upgrade notes: v2 to v3
- Coming from web-scumm
- Package reference
- Install troubleshooting
Create a game (55)
- Your first game
- Layout of a created project and of the engine repository
- The working loop
- Content principles and the identity contract
- Rooms
- Geometry: placement, walk zones, masks, layers, camera
- Something is visible but unreachable
- Reactions
- Game commands
- Conditions
- Flags, variables and events: which to use
- Custom code
- Characters
- Items and inventory
- World map
- Dialogues
- Scripts and events
- Moving characters: patrols and walks
- Exits
- Chapters and objectives
- State and saves: persistent or temporary, renaming an id, migrations
- Staging: wide rooms and animations
- The stage: lights, particles, floors
- Skin and fonts
- Title and credits
- Heroes: several characters and hero choice
- Built-in minigames
- A custom minigame
- Translations
- Music in stems
- Sound effects
- Voices: per language and per hero
- Images: prompts, cutting sheets, transparency, scale
- Asset provenance
- The storyboard, source of truth
- Puzzle design
- Classic mechanics
- Review pages
- DSL reference
- Checking your game
- What the solver proves
- Solver options
- Playtests
- Remix
- Speedrun for authors
- The sealed ending
- Production template
- Example games
- Working with an AI
- Build and release a game
- Publish on GitHub Pages
- The static game on Clever Cloud
- Other static hosts
- Sub-path, cache and service worker, incomplete deploys, going back
- Testing on a phone over the LAN
Local Studio (24)
- The local Studio: overview and launch
- Edit a room
- Placement and stage
- Preview, apply, undo
- Storyboard
- Assets and cutting
- Check: validator, solver, critical path, heat, health, coverage
- Before and after captures
- Semantic diff
- Play and replay a session
- Rule explainer
- Language and objectives
- Voices and the heroes × languages matrix
- Map
- Notes
- Remix in the Studio
- Music
- The Assistant: bring your own key
- Demo mode and studio-apply
- Local and LAN security
- Studio API
- Local MCP: setting up each client
- MCP tools
- Studio troubleshooting
Team Studio (21)
- What runs where
- Concepts: revision, transaction, span, lease, preview, build
- Starting as an invited dev
- Working together day to day
- Roles and actions: the full matrix
- Invitations
- Managing members
- Write refused on the hosted Studio: stale base revision (409)
- Write refused on the hosted Studio: span locked (423)
- Recovering after a lost lease, a disconnection or a stale preview
- Comments
- Map and semantic diff
- Publishing builds
- Remote MCP
- The game in Git
- Upgrading the engine of a hosted game
- Hosted assets
- The server's command line
- Health and metrics routes
- Trying it locally with compose.yml
- Known limits
Clever Cloud (23)
- Clever Cloud: overview, cost and prerequisites
- Apps and add-ons
- Domains and TLS
- Keycloak
- Generic OIDC and GitLab
- Configuration
- First deployment
- Backups
- RPO and RTO
- Restore the Studio on a fresh installation
- Redeploys
- Upgrading the server and checking state after a migration
- Limits of going back
- Monitoring
- Security
- Rotating keys
- Recovering admin access
- Changing domain or OIDC provider
- Worker, PostgreSQL or Cellar down
- Exporting the game and leaving the installation
- Retention
- Clever Cloud troubleshooting
- Costs and teardown
Reality Bridge and connectors (16)
- The Reality Bridge: what it is
- Quick start
- Guarantees
- Install and run the Bridge
- Backup and restore
- Several tenants
- Signals and the manifest
- The Bridge's command line
- Connectors overview
- Email connector
- Telnet connector
- SSH connector
- Open Badges connector
- The connector SDK
- Security: Biscuit and signatures
- Bridge and connector troubleshooting
Contribute (25)
- Welcome
- Developer setup
- The dev loop
- Before a pull request
- Conventions
- Writing documentation
- Architecture
- Code tour
- Import boundaries
- Which tests run when
- Mutation testing
- The coverage ratchet
- The quality baseline
- CI explained
- Field passes
- Benchmarks
- Releasing
- npm packages
- Decisions and ADRs
- Governance
- Bot pull requests
- Contributing with AI agents
- Security policy
- Code of conduct
- Licences and credits