MCPcopy Create free account
hub / github.com/subquery/subql / dropColumnQuery

Function dropColumnQuery

packages/node-core/src/db/sync-helper.ts:708–709  ·  view source on GitHub ↗
(schema: string, columnName: string, tableName: string)

Source from the content-addressed store, hash-verified

706
707// columns
708export const dropColumnQuery = (schema: string, columnName: string, tableName: string): string =>
709 `ALTER TABLE "${schema}"."${modelToTableName(tableName)}" DROP COLUMN IF EXISTS ${columnName};`;
710
711export const createColumnQuery = (schema: string, table: string, columnName: string, attributes: string): string =>
712 `ALTER TABLE ${escapedName(schema, table)} ADD COLUMN IF NOT EXISTS "${columnName}" ${attributes};`;

Callers 1

dropTsVectorColumnQueryFunction · 0.85

Calls 1

modelToTableNameFunction · 0.90

Tested by

no test coverage detected