Does anyone else's Community CLI not work?
jahmezz
Posts: 4 New member
Hello,
I installed Flyway Community to get access to the Flyway CLI so I can run "flyway migrate".
I found in our current project's setup (it runs "flyway migrate" without any config files), this wasn't doing anything.
I uninstalled Community and installed the CLI instead. https://documentation.red-gate.com/fd/command-line-184127404.html
This worked.
Anyone else have this?
Thank you.
I installed Flyway Community to get access to the Flyway CLI so I can run "flyway migrate".
I found in our current project's setup (it runs "flyway migrate" without any config files), this wasn't doing anything.
I uninstalled Community and installed the CLI instead. https://documentation.red-gate.com/fd/command-line-184127404.html
This worked.
Anyone else have this?
Thank you.
Tagged:
Best Answers
-
Peter_Laws Posts: 259 Silver 2Given it's PowerShell, you're most likely not seeing the debug output because the default PowerShell debug settings are to just silently continue without showing you anything. (source)
Additionally if you add -X to the end of your command you'll enable flyways debug output, it still requires PS debug to be enabled, but you'll get a lot more info.
One of the reasons you provide the application is to take care of these things for you.
If you find an exception in your debug output, I'd be happy to take a look for you. -
jahmezz Posts: 4 New memberEDIT: Your comments were right. The table name was wrong, causing the error. Debug output being on would have saved me. Thank you.
Tried it again on another computer that had Flyway Desktop installed.
Using Command Prompt...
flyway -X migrate -url=jdbc:postgresql://localhost:5432/database -locations=filesystem:./migrations -user=postgres -password=postgres
No output.
Even doing flyway version has no output.
flyway by itself outputs the help information.
Here is screenshot of the Flyway Desktop About screen on my computer. https://postimg.cc/t17rPfSP
The remaining database update to do was this...ALTER TABLE tableADD COLUMN column10 NOT NULL DEFAULT 0;
After running flyway migrate, this does not apply. The flyway schema history remains unchanged.
But as I mention in the first comment, after uninstalling Flyway Desktop and installing the CLI, it worked just fine.
Answers
When you say Flyway Community, do you mean Flyway Desktop, community edition?
(There's a flyway cli community edition as well)
I would not expect migrate to proceed without any config as it wouldn't have a target. I'd be happy to reproduce the test if you can please give us a little more detail.
When I ran this, I saw no debug statements at all. Just a silent end of the program.
But when I uninstalled Flyway Desktop Community and installed Flyway CLI for Windows, it showed me printed logs and completed the migration just fine.
More information about things...
1. The migrations folder was a simple child folder ./migration
2. The DB is postgres at localhost:5432, username postgres, password postgres...
3. The migration itself was ALTER TABLE add one column to the table.
It just wouldn't run. But the CLI download would.
The version of Flyway Desktop you have, where did you pull it down from please?
I'd expect a slightly newer version to be available and want to check all our available sources are current.
Thanks!