Skip to main content

Function: meetingStoresUpgradeDdl()

meetingStoresUpgradeDdl(tablePrefix?): string

Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:174

The upgrade that brings tables an earlier version's meetingStoresDdl made to this version's columns: one ALTER TABLE ... ADD COLUMN IF NOT EXISTS for each column of the runs and run-lock tables that such tables may lack, each made as the fresh schema makes it, then the partial index the funding scan reads. Applied twice, or to tables this version made, it changes nothing. The stores read and write every column, so a host runs it in its migration, in one transaction (db.transaction((tx) => tx.exec(meetingStoresUpgradeDdl(prefix)))), before it constructs them.

Parameters​

tablePrefix?​

string = DEFAULT_TABLE_PREFIX

The prefix the tables were made under.

Returns​

string

Throws​

Error, the one meetingStoreTables throws, when the prefix is not a lower-case letter followed by at most 37 lower-case letters, digits or underscores; no SQL is built.