MCPcopy Index your code
hub / github.com/drawdb-io/drawdb / mkCreate

Function mkCreate

src/utils/migrations/diffToSQL.js:628–629  ·  view source on GitHub ↗
(arr, unique = false)

Source from the content-addressed store, hash-verified

626 const ifNotExists =
627 database === DB.SQLITE ? "IF NOT EXISTS " : "";
628 const mkCreate = (arr, unique = false) =>
629 `CREATE ${unique ? "UNIQUE " : ""}INDEX ${ifNotExists}${q(indexName)} ON ${q(name)} (${idxFields(arr)});`;
630 up.push(dropIdx);
631 up.push(mkCreate(change.to));
632 down.push(dropIdx);

Callers 1

generateMigrationSQLFunction · 0.85

Calls 1

idxFieldsFunction · 0.85

Tested by

no test coverage detected