Skip to content

Commit 9f9c488

Browse files
authored
fix(cli): pass column/table to correct params in generate property (wheels-dev#2357)
The legacy CommandBox `wheels generate property` delegated to `wheels dbmigrate create column` with the wrong parameter names: the plural model name was passed as `name` (treated as the column name by the target) and `tableName` was never supplied, triggering an interactive prompt the user couldn't see. The result was a migration with `table='n'` (whatever the user typed at the silent prompt) and `columnName='users'` (the table name). Swap the call to match the target's signature so `name` carries the column and `tableName` carries the table. Closes wheels-dev#2355
1 parent a87f5db commit 9f9c488

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cli/src/commands/wheels/generate/property.cfc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ component aliases='wheels g property' extends="../base" {
8484
detailOutput.invoke("dbmigrate");
8585
command('wheels dbmigrate create column')
8686
.params(
87-
name=obj.objectNamePlural,
88-
columnName=lcase(arguments.columnName),
87+
name=lcase(arguments.columnName),
88+
tableName=obj.objectNamePlural,
8989
dataType=arguments.dataType,
9090
default=arguments.default,
9191
allowNull=arguments.allowNull,

0 commit comments

Comments
 (0)