Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sqlite support #60

Closed
kifirkin opened this issue Feb 7, 2017 · 0 comments · Fixed by #63
Closed

Add sqlite support #60

kifirkin opened this issue Feb 7, 2017 · 0 comments · Fixed by #63

Comments

@kifirkin
Copy link
Contributor

kifirkin commented Feb 7, 2017

I think sqlite easier and more faster way for development purposes.

It's very easy to add sqlite3 support with import gorm/dialects/sqlite inside db/db.go
and new adapter config

if config.Config.DB.Adapter == "sqlite" {
	DB, err = gorm.Open("sqlite3", fmt.Sprintf("%v\\%v.sqlite3", os.TempDir(), dbConfig.Name))
}

But it depends on mattn/go-sqlite3 wich needs gcc available on path.

I've got msys2 with mingw-w64-x86_64-toolchain on my Windows 7 machine and it works perfect for me.

This was referenced Feb 7, 2017
@jinzhu jinzhu closed this as completed in #63 Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant