Running on Windows?

Issue #9 resolved
Otto Bretz created an issue

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)

  1. Liam Staskawicz repo owner

    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.

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

    1. 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;
    
    1. Unpack the project, I did it in c:\temp
    2. Open c:\temp\myproj in command prompt and run goose up
    3. Error message printed and there is no goose table in the database.
  3. Liam Staskawicz 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?

  4. Otto Bretz reporter

    I'm running an entire revel project with lib/pq on Windows. No problems so far. Could it be something with path handling?

  5. Liam Staskawicz 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.

  6. Otto Bretz reporter

    I upgraded to the current version today and the problem appears to have been fixed. Thanks!

  7. Liam Staskawicz repo owner

    Hm, interesting!

    For the record, did you update any of your other deps as well (postgres and/or lib/pq)?

  8. Otto Bretz 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.

  9. Log in to comment