MCPcopy
hub / github.com/drawdb-io/drawdb / defVal

Function defVal

src/utils/migrations/diffToSQL.js:364–368  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

362
363 case "default": {
364 const defVal = (v) =>
365 parseDefault(
366 { default: v, type: columnType || "VARCHAR" },
367 database,
368 );
369 if (change.to != null && change.to !== "") {
370 up.push(
371 `ALTER TABLE ${q(name)} ALTER COLUMN ${q(columnName)} SET DEFAULT ${defVal(change.to)};`,

Callers 1

generateMigrationSQLFunction · 0.85

Calls 1

parseDefaultFunction · 0.90

Tested by

no test coverage detected