Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Add index on document_id.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkistner committed Jan 16, 2024
1 parent 8645f4b commit 5bdb6e8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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({
Expand All @@ -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'})]})
]
})
]);

0 comments on commit 5bdb6e8

Please sign in to comment.