Skip to content

[Drift] Schema v1 constructor syntax removed in JS SDK v2 (powersync-js #1004) #521

Description

@benitav

What's changing: The JavaScript SDK removes the deprecated v1 Table constructor syntax, where columns and indices were passed as arrays of Column, Index, and IndexedColumn class instances. The v2 object-literal syntax is now the only supported form. TableV2Options is renamed to TableOptions.

High priority — existing docs are now inaccurate or incomplete

  • GIS Data: PostGIS page (/client-sdks/advanced/gis-data-postgis) — the "AppSchema Example" under "On the Client" uses the JavaScript v1 syntax: new Table({ name: 'todos', columns: [ new Column({ name: 'list_id', type: ColumnType.TEXT }), ... ], indexes: [new Index({ name: 'list', columns: [new IndexedColumn({ name: 'list_id' })] })] }). In v2, Column, Index, and IndexedColumn class constructors are removed from the public API and this code will not work.

For reviewer consideration — may be worth documenting
None.

Source PR: powersync-ja/powersync-js#1004 — merged to the v2 pre-release branch on 2026-06-25. This change has not shipped in a stable release.

Filed automatically by Claude Code (claude-sonnet-4-6). A human must verify the scope, prepare the docs PR, and publish it only once this update has been released.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions