Skip to main content
Sync Rules are deprecated. For the Sync Streams version of this page, see Multiple Client Versions.
When schema changes are additive, old clients ignore the new tables and columns, and no special handling is required. More drastic changes, such as renaming tables or changing a table’s structure, can break older app versions that are still in use. In these cases, define separate versions of the affected bucket definitions so that each client version receives the tables and columns it expects.

Versioning with Client Parameters

Clients pass their version to the PowerSync Service as a client parameter, and parameter queries filter on it so that each client only receives the buckets for its version. For example, suppose a new app version changes the structure of the assets table in its client-side schema, defining it as assets_v2, while older app versions still define assets. Define a second bucket definition alongside the existing one, using an alias to map the source assets table to the new client-side name, and filter each on a schema_version client parameter:
Handle queries based on parameters set by the client with care. The client can send any value for these parameters, so it’s not a good place to do authorization. If the parameter must be authenticated, use parameters from the JWT instead.