MCPcopy Index your code
hub / github.com/simstudioai/sim / setTableSchemaForImport

Function setTableSchemaForImport

apps/sim/lib/table/import-data.ts:133–138  ·  view source on GitHub ↗
(tableId: string, schema: TableSchema)

Source from the content-addressed store, hash-verified

131
132/** Overwrites a table's schema during an import (used when inferring columns from the file). */
133export async function setTableSchemaForImport(tableId: string, schema: TableSchema): Promise<void> {
134 await db
135 .update(userTableDefinitions)
136 .set({ schema, updatedAt: new Date() })
137 .where(eq(userTableDefinitions.id, tableId))
138}
139
140/**
141 * Owns the append-import transaction so the API route never holds a `trx`:

Callers 1

resolveSetupFunction · 0.90

Calls 2

setMethod · 0.65
eqFunction · 0.50

Tested by

no test coverage detected