Skip to content

Commit c154df5

Browse files
[Pg-kit]: Fix functional index generation in pull
Fixed a bug where `drizzle-kit pull` generated incorrect TypeScript for functional/computed indexes. The generator was incorrectly using the boolean `isExpression` property instead of the `value` property when creating the `sql` template literal, resulting in `sql`true`` in the output. Fixes #5224
1 parent 42c284e commit c154df5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drizzle-kit/src/dialects/postgres/typescript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ const createTableIndexes = (tableName: string, idxs: Index[], casing: Casing): s
665665
it.columns
666666
.map((it) => {
667667
if (it.isExpression) {
668-
return `sql\`${it.isExpression}\``;
668+
return `sql\`${it.value}\``;
669669
} else {
670670
return `table.${withCasing(it.value, casing)}${it.asc ? '.asc()' : '.desc()'}${
671671
it.nullsFirst ? '.nullsFirst()' : '.nullsLast()'

0 commit comments

Comments
 (0)