Running on Windows?
Goose runs great for me on OSX and FreeBSD but when I tried on Windows I got this error.
Any ideas what could be going wrong? I'm running go1.1.2 on win7.
Comments (9)
-
repo owner -
reporter PostgreSQL 9.3, I've reproduced it on a winxp machine now also.
I have C:\Documents and Settings\Otto\My Documents\go\bin added to my path. Goose installed without any problems and I can run it from the command prompt.
- create an empty database:
CREATE DATABASE goose_test WITH OWNER = goose_test ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'Swedish_Sweden.1252' LC_CTYPE = 'Swedish_Sweden.1252' CONNECTION LIMIT = -1;
- Unpack the project, I did it in c:\temp
- Open c:\temp\myproj in command prompt and run
goose up
- Error message printed and there is no goose table in the database.
-
repo owner Hm, I don't see anything obvious, and I don't have access to a Windows machine to test on at the moment. I wonder if it could be a difference in the way lib/pq (the postgres driver) runs on Windows.
Would it be possible for you to create a simple test in Go using database/sql directly (ie, removing goose from the equation) to execute that statement, and see if that works?
-
reporter I'm running an entire revel project with lib/pq on Windows. No problems so far. Could it be something with path handling?
-
repo owner We've had some path handling issues before that have been resolved and this doesn't look like it's directly related to the filesystem, so that would not be my first suspicion, but it's not out of the question.
In your work with revel, have you run these specific SQL queries? I'm wondering if these particular interactions (creating tables) are perhaps not well supported in lib/pq on windows.
If possible, I think it would still be helpful to run these statements in a simple .go script if possible, just to eliminate any uncertainty.
-
reporter I upgraded to the current version today and the problem appears to have been fixed. Thanks!
-
repo owner Hm, interesting!
For the record, did you update any of your other deps as well (postgres and/or lib/pq)?
-
reporter Not intentionally but I did a go get -u bitbucket.org/liamstask/goose/cmd/goose and it looks like lib/pq was updated also.
-
repo owner - changed status to resolved
Cool, thanks. I'll just assume it was a lib/pq issue for now, lacking any other info.
- Log in to comment
Can you share the details of the database you're using and its version?
Specific steps to reproduce would be helpful as well, starting from an empty DB if possible.
It looks like goose is not finding any valid records of any previous migrations, although the table appears to exist.