package db

import (
	"github.com/jinzhu/gorm"
	_ "github.com/jinzhu/gorm/dialects/sqlite"
)

// InitDB load the database and the models
func InitDB() {
	db, err := gorm.Open("sqlite3", "test.db")
	if err != nil {
		panic(err.Error())
	}
	defer db.Close()

	db.AutoMigrate(&User{})

}
