Skip to content

Remove old schema v1 syntax#1004

Draft
simolus3 wants to merge 5 commits into
v2from
remove-schema-v1
Draft

Remove old schema v1 syntax#1004
simolus3 wants to merge 5 commits into
v2from
remove-schema-v1

Conversation

@simolus3

@simolus3 simolus3 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

The Table constructor supports two syntax variants:

  1. A deprecated v1 variant where columns and indices are passed as arrays.
  2. The v2 variant we use by default everywhere, using JS objects to declare column names and types.

Since the v1 variant is deprecated and a comment explains that it'll be removed in the next major release, now is the time for that. This PR:

  • Removes explicit v2 names (like TableV2Options), replacing them with plain names (TableOptions).
  • Removes the v1 syntax from the Table constructor.

The ability to construct a table from an array of columns is still useful, however:

  • In the diagnostics client, creating a schema through table arrays is simpler than having to construct records.
  • We have to represent tables as columns arrays at some point, as that's the format expected by the core extension.

So, this adds ResolvedTable as an advanced class representing columns the old way. This kind of weakens the idea of removing v1 variants, but I think being explicit about the way tables are constructed (instead of allowing both styles on the same constructor) is a decent simplification already.

AI use: I used Claude Code to help migrate a helper types and demos.

@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3fe3cd9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@powersync/attachments Major
@powersync/react-native Major
@powersync/common Major
@powersync/web Major
@powersync/capacitor Major
@powersync/node Major
@powersync/nuxt Major
@powersync/adapter-sql-js Patch
@powersync/attachments-storage-react-native Major
@powersync/drizzle-driver Major
@powersync/kysely-driver Major
@powersync/op-sqlite Major
@powersync/react Major
@powersync/tanstack-react-query Major
@powersync/vue Major
@powersync/diagnostics-app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant