snipe-migrations
snipe-migrations copied to clipboard
Windows-specific issues?
When I was setting this up on my Windows (localhost), I ran into a couple of problems:
-
I had to add MySQL to my PATH so that the mysqldump command would work. Maybe this should be stated on the README? It wasn't immediately obvious to me, at least.
-
The "2>/dev/null" at the end of the mysqldump call gives the output "The system cannot find the file specified" and results in an empty
snipe_snapshot.sql
file. Removing it fixes the error and the sql file is then populated.
I have the same exact issues on Windows 7, running Laravel Homestead for my sites locally. (This was a Laravel 5.8.23 project.)
Looks like the laravel/framework repo does some detecting of whether it is windows or not when choosing to append /dev/null
:
https://github.com/laravel/framework/search?q=%2Fdev%2Fnull&unscoped_q=%2Fdev%2Fnull
Seems like doing the null output suppresses the following errors on Windows:
- 'mysqldump' is not recognized as an internal or external command, operable program or batch file.
- 'mysql' is not recognized as an internal or external command, operable program or batch file.
So if on a Windows machine, the backup is not going to run through Homestead but your local machine. Notes about installing the MySQL 8 server on Windows to check the availability of mysql -v
would be good.
I think the latest code will resolve these issues. Can you confirm?
Hi! I found some problems running Snipe Migrations:
- On Windows the mysqldump and mysql command didn't work
- The timeSum and storedTimeSum always was different. It was comparing with a "!==" a number (someting like 123456789.0) with a string ("123456789").
I tried to fix them on the following Pull Request: https://github.com/drfraker/snipe-migrations/pull/34
I couldn't check if it's working with GNU/Linux or Mac OS
Today I could make a new test and the fixes are also working on GNU/Linux (using Docker)