snipe-migrations icon indicating copy to clipboard operation
snipe-migrations copied to clipboard

Windows-specific issues?

Open Dylan-Chapman opened this issue 5 years ago • 5 comments

When I was setting this up on my Windows (localhost), I ran into a couple of problems:

  1. 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.

  2. 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.

Dylan-Chapman avatar Jun 01 '19 18:06 Dylan-Chapman

I have the same exact issues on Windows 7, running Laravel Homestead for my sites locally. (This was a Laravel 5.8.23 project.)

BrandonSurowiec avatar Jun 19 '19 12:06 BrandonSurowiec

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.

BrandonSurowiec avatar Jun 19 '19 13:06 BrandonSurowiec

I think the latest code will resolve these issues. Can you confirm?

drfraker avatar Sep 27 '19 23:09 drfraker

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

royfandi avatar Apr 15 '20 22:04 royfandi

Today I could make a new test and the fixes are also working on GNU/Linux (using Docker)

royfandi avatar Apr 20 '20 17:04 royfandi