Skip to main content
The PowerSync Client SDKs expose a managed SQLite database that your app can read from and write to. The client-side schema refers to the schema for that SQLite database. The client-side schema is typically mainly derived from your backend database schema and Sync Rules, but can also include other tables such as local-only tables. Note that schema migrations are not required on the SQLite database due to the schemaless nature of the PowerSync protocol: schemaless data is synced to the client-side SQLite database, and the client-side schema is then applied to that data using SQLite views to allow for structured querying of the data.
Generate schema automaticallyIn the PowerSync Dashboard, select your project and instance and click the Connect button in the top bar to generate the client-side schema in your preferred language. The schema will be generated based off your Sync Rules.Similar functionality exists in the CLI.Note: The generated schema will exclude an id column, as the client SDK automatically creates an id column of type text. Consequently, it is not necessary to specify an id column in your schema. For additional information on IDs, refer to Client ID.

Example implementation

For an example implementation of the client-side schema, see the Getting Started section of the SDK reference for your platform:

ORM Support

For details on ORM support in PowerSync, refer to Using ORMs with PowerSync on our blog.

Next Step

The next step is to instantiate the client-side PowerSync database:

Instantiate the PowerSync Database →