Skip to main content
Use this guide when you need to create or change a TinyCloud SQL schema. The SDK’s migration helper applies versioned SQL during install or startup instead of running ad hoc DDL in a hot path.

Apply migrations

Use stable migration ids and run them before serving user traffic.

Request the schema capability

Schema changes need the tinycloud.sql/schema action for the same database path used at runtime. If you use the tc.sql shortcut, the database name is default.
Those two forms target the same database.

What to avoid

  • do not run cold CREATE TABLE or ALTER TABLE in a request path
  • do not copy app-specific schema bootstrap helpers between apps
  • do not treat mirrored indexes as canonical data without saying so

Source note

The migration helper and schema permission behavior are implemented in the JS SDK and SQL service tests. This guide stays on the operational path and leaves exact SQL semantics to the code.