@powersync/web 0.0.0-dev-20260306125455 → 0.0.0-dev-20260309101613

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15588,21 +15588,11 @@ class TriggerManagerImpl {
15588
15588
  });
15589
15589
  }
15590
15590
  async createDiffDestinationTable(tableName, options) {
15591
- const tableTriggerTypeClause = options?.temporary ? 'TEMP' : '';
15592
- const onlyIfNotExists = options?.onlyIfNotExists ? 'IF NOT EXISTS' : '';
15593
- let x = `
15594
- CREATE ${tableTriggerTypeClause} TABLE ${onlyIfNotExists} ${tableName} (
15595
- operation_id INTEGER PRIMARY KEY AUTOINCREMENT,
15596
- id TEXT,
15597
- operation TEXT,
15598
- timestamp TEXT,
15599
- value TEXT,
15600
- previous_value TEXT
15601
- )
15602
- `;
15603
- console.log(x);
15591
+ const { temporary = true, onlyIfNotExists = false } = options ?? {};
15592
+ const tableTriggerTypeClause = temporary ? 'TEMP' : '';
15593
+ const onlyIfNotExistsClause = onlyIfNotExists ? 'IF NOT EXISTS' : '';
15604
15594
  await this.db.execute(/* sql */ `
15605
- CREATE ${tableTriggerTypeClause} TABLE ${onlyIfNotExists} ${tableName} (
15595
+ CREATE ${tableTriggerTypeClause} TABLE ${onlyIfNotExistsClause} ${tableName} (
15606
15596
  operation_id INTEGER PRIMARY KEY AUTOINCREMENT,
15607
15597
  id TEXT,
15608
15598
  operation TEXT,
@@ -15641,7 +15631,7 @@ class TriggerManagerImpl {
15641
15631
  const internalSource = sourceDefinition.internalName;
15642
15632
  const triggerIds = [];
15643
15633
  const id = await this.getUUID();
15644
- const releaseStorageClaim = useStorage ? await this.options.claimManager.obtainClaim(id) : null;
15634
+ const releaseStorageClaim = useStorage && !manageDestinationExternally ? await this.options.claimManager.obtainClaim(id) : null;
15645
15635
  /**
15646
15636
  * We default to replicating all columns if no columns array is provided.
15647
15637
  */