(client: Client)
| 153 | columns.has(column) ? `${quoteIdent(table)}.${quoteIdent(column)}` : "NULL"; |
| 154 | |
| 155 | const isLocalV1Database = async (client: Client): Promise<boolean> => { |
| 156 | if (!(await tableExists(client, "source"))) return false; |
| 157 | const sourceColumns = await columnNames(client, "source"); |
| 158 | if (!sourceColumns.has("scope_id")) return false; |
| 159 | if (!(await tableExists(client, "integration"))) return true; |
| 160 | const connectionColumns = await columnNames(client, "connection"); |
| 161 | return !connectionColumns.has("tenant") || connectionColumns.has("scope_id"); |
| 162 | }; |
| 163 | |
| 164 | // --------------------------------------------------------------------------- |
| 165 | // Data-migration-ledger gate. |
no test coverage detected