Closed tiger5226 closed 5 years ago
For now I was able to work around this issue, by building a local version of sqlboiler from the 2.7.4 tag, placing it in the go path, and running it as normal.
Interesting enough I could not even use go get -u -t gopkg.in/volatiletech/sqlboiler.v2
Note that gopkg.in is a deprecated way of using sqlboiler. And you should be cloning (and vendoring) using tools like dep
, glide
but probably go modules
is the best way.
I can't really understand what's going on there, seems like it may be a problem with your mysql ssl configuration? Have you tried disabling it in the config?
Yeah, its disabled in the config. It is a weird one. I was just trying to use gopkg.in to make sure I get v2 because I could not sucessfully upgrade to v3 at the time. I still have not put additional effort yet, but I will have to. For the cert issue, I did not make any changes, so I figured maybe you had seen or heard of this from others upgrading. The web is very generic. When I find the root cause of this from the v3 upgrade, I will post it here for others. I presume that are some additional assumptions added/removed that trigger this error. Just need to figure out where.
I still have not resolved this problem and am stuck with V2 right now. Going to try and put some time in today digging into the application. Something definitely changed in V3 that this is now a problem.
Ok the problem was the toml. sslmode=false
does not work for V3. sslmode="false"
does.
All the null checks are missing now though. So I can't do MyTable.MyColumn.IsNull()
anymore. Trying to find out of there is some backwards compatibility added in for this. Did not see it mentioned in the V3 video. I saw mentions of type replacements...maybe that has something to do with this. It would be alot easier to upgrade if the null library could be retained I guess.
going to close this as I am now upgraded to v3.
@tiger5226 curious what you mean by the IsNull thing doesn't exist anymore. We haven't changed the null package almost at all. It's possible your column type got changed but there was no intentional breakage with what you're talking about in this issue about null stuff.
So it appears that the null package uses IsZero()
now instead of IsNull()
. I confirmed again just to be sure and it is definitely null.String
type. And the package its using in the generated code is "github.com/volatiletech/null"
. Do you think something is wrong? I did not merge the upgrade yet but I have tested ( not the IsZero
specifically ) generally and things appear ok.
It just seems weird since nothing should have changed in this area.
Hello,
I had a similar issue:
Error: unable to initialize tables: unable to fetch table data: something totally unexpected happened when running the binary driver /home/myo/go/src/project/sqlboiler-mysql: fork/exec /home/myo/go/src/project/sqlboiler-mysql: no such file or directory
After some debugging, I found out that in my .bashrc
, I set the $PATH
with a ~/go/bin
and Exec.LookPath()
doesn't seem to work with ~
.
After replacing that path with a full path it works.
Hey, I had the same issue with sqlboiler v3.7.1
.
I was able to resolve mine with the following steps:
rm $(which sqlboiler)
rm $(which sqlboiler-mysql)
go get -u -t github.com/volatiletech/sqlboiler
go get -u -t github.com/volatiletech/sqlboiler/drivers/sqlboiler-mysql
export PATH=$PATH:$GOPATH/bin # or export PATH=$PATH:$HOME/go/bin
gen_models.sh
Error
This is an odd one. It's looking for a binary driver in the wrong location.
So I created the folder to see if I can get around this problem.
I got a different error, but I also
chmod 777
just in case and I get the same error. So I am stuck. The last time I generated for the model was at the end of August. Not sure what changed.So I did some research, realized V3 is now the main thing to use. Amazing video!! So I ran the go get for the driver.
go get -u -t github.com/volatiletech/sqlboiler/drivers/sqlboiler-mysql