richard.herbert
09/04/2023, 8:41 AM--pretend switch in commandbox-migrations but I'm getting an error.
migrate down --pretend down.sql
Parameter [once] has a value of ["down.sql"] which is not of type [boolean].
What have I misunderstood?Adam Cameron
--pretend=true or --pretend true or something?Adam Cameron
richard.herbert
09/04/2023, 11:43 AMmigrate down --once --pretend=true down.sql
appears to have actioned the down which is why I added the --once this time as insurance.
I guess I'll have to dig into the source to see where I have it wrong.richard.herbert
09/04/2023, 4:53 PMmigrate down --once --pretend=true file=down.sql
...but that didn't make any difference. What I should have done is...
migrate down --once --pretend file=down.sql
I guess that makes sense.Adam Cameron
--file not just file.
But there's poss some well-thought-out reason for it. I'm just CB noob after all.Adam Cameron
richard.herbert
09/04/2023, 6:31 PM-- prefixes. Other command line tools, not so much, which is where I also get confused. Another conversation I know but I would have thought -h when you want to be terse and --help when you want to be explicit should be the convention. Not all tools work like that I've found.
The online docs seem to be behind the command line help which doesn't help. Also with the default position for these switches being false if you are explicit, as I was trying to be, and use --once=true they seems to be ignored. Maybe I'll take a hack at that.
I think the issue is that these are meant to be argument that also operate as switches. I could test this but I've moved on now...
migrate up once=true pretend=true file=up.sql
...and I guess that would work.
Anyway, I appreciate your thoughts whilst our American friends "labor" today.Adam Cameron
richard.herbert
09/04/2023, 6:42 PM