Skip to content

Commit 8651081

Browse files
waleedlatif1claude
andcommitted
fix: unique constraint check crash and copilot table initial rows
- Fix TypeError in updateColumnConstraints: db.execute() returns a plain array with postgres-js, not { rows: [...] }. The .rows.length access always crashed, making "Set unique" completely broken. - Add initialRowCount: 20 to copilot table creation so tables created via chat have the same empty rows as tables created from the UI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5362f74 commit 8651081

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

apps/sim/lib/copilot/tools/server/table/user-table.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ export const userTableServerTool: BaseServerTool<UserTableArgs, UserTableResult>
229229
schema: args.schema,
230230
workspaceId,
231231
userId: context.userId,
232+
initialRowCount: 20,
232233
},
233234
requestId
234235
)

0 commit comments

Comments
 (0)