File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @powersync/attachments ' : minor
3+ ---
4+
5+ Added ` attachmentTableName ` option to attachment queue which allows you to specify the table name it should work with.
Original file line number Diff line number Diff line change @@ -14,9 +14,14 @@ export interface AttachmentQueueOptions {
1414 */
1515 cacheLimit ?: number ;
1616 /**
17- * The name of the directory where attachments are stored on the device, not the full path
17+ * The name of the directory where attachments are stored on the device, not the full path. Defaults to `attachments`.
1818 */
1919 attachmentDirectoryName ?: string ;
20+
21+ /**
22+ * The name of the table where attachments are stored, defaults to `attachments` table.
23+ */
24+ attachmentTableName ?: string ;
2025 /**
2126 * Whether to mark the initial watched attachment IDs to be synced
2227 */
@@ -36,7 +41,8 @@ export interface AttachmentQueueOptions {
3641}
3742
3843export const DEFAULT_ATTACHMENT_QUEUE_OPTIONS : Partial < AttachmentQueueOptions > = {
39- attachmentDirectoryName : 'attachments' ,
44+ attachmentDirectoryName : ATTACHMENT_TABLE ,
45+ attachmentTableName : ATTACHMENT_TABLE ,
4046 syncInterval : 30_000 ,
4147 cacheLimit : 100 ,
4248 performInitialSync : true ,
@@ -90,7 +96,7 @@ export abstract class AbstractAttachmentQueue<T extends AttachmentQueueOptions =
9096 }
9197
9298 get table ( ) {
93- return ATTACHMENT_TABLE ;
99+ return this . options . attachmentTableName ! ;
94100 }
95101
96102 async init ( ) {
You can’t perform that action at this time.
0 commit comments