diff --git a/demos/powersync-supabase-yjs-text-collab-demo/src/library/powersync/AppSchema.ts b/demos/powersync-supabase-yjs-text-collab-demo/src/library/powersync/AppSchema.ts index 44302db..92ca941 100644 --- a/demos/powersync-supabase-yjs-text-collab-demo/src/library/powersync/AppSchema.ts +++ b/demos/powersync-supabase-yjs-text-collab-demo/src/library/powersync/AppSchema.ts @@ -1,4 +1,4 @@ -import { Column, ColumnType, Schema, Table } from '@journeyapps/powersync-sdk-web'; +import { Column, ColumnType, Index, IndexedColumn, Schema, Table } from '@journeyapps/powersync-sdk-web'; export const AppSchema = new Schema([ new Table({ @@ -14,6 +14,9 @@ export const AppSchema = new Schema([ new Column({ name: 'created_at', type: ColumnType.TEXT }), new Column({ name: 'document_id', type: ColumnType.TEXT }), new Column({ name: 'update_b64', type: ColumnType.TEXT }) + ], + indexes: [ + new Index({ name: 'by_document', columns: [new IndexedColumn({name: 'document_id'})]}) ] }) ]);