lukevers / kittens

A scriptable IRC bot hub written in Go with Lua plugins
MIT License
83 stars 10 forks source link

New setup doesn't set up database (database.go:101 using unaddressable value) #65

Closed michaelowens closed 9 years ago

michaelowens commented 9 years ago

I'm new to the Go language and scene, so I may have forgotten something, but I can't seem to find what it is. I followed the README, but I can't login to the interface, but I think it doesn't make the database properly. It creates the sqlite kittens.db file (and I have sqlite3 installed), but it errors on boot:

database.go:101 using unaddressable value

error

go version go1.4.2 darwin/amd64

Did I forget a step? I also tried re-building several times which didn't solve it. I tried disabling the line, which did get rid of the warnings (so it does build properly).

michaelowens commented 9 years ago

After some googling and looking at the GORM documentation, changing line 101 to the following worked for me:

db.AutoMigrate(&User{}, &Server{}, &Channel{}, &IrcUser{}, &IrcUserChannel{})

lukevers commented 9 years ago

Hey thanks for letting me know. I haven't had time to work on this in a while and I know gorm has progressed a lot since I used it with this. I'll both update that soon and try to work on it more.

On Sun, May 3, 2015 at 8:49 AM, Michael Owens notifications@github.com wrote:

After some googling and looking at the GORM documentation, changing line 101 to the following worked for me:

db.AutoMigrate(&User{}, &Server{}, &Channel{}, &IrcUser{}, &IrcUserChannel{})

Reply to this email directly or view it on GitHub: https://github.com/lukevers/kittens/issues/65#issuecomment-98477521