package env

import (
	"fmt"
	"goqs/dbsql"
	"goqs/models"
)

func InitDB() {
	db, err := dbsql.GetConn(dbsql.DSN_local)
	if err != nil {
		return
	}
	err = db.AutoMigrate(&models.Base{})
	if err != nil {
		fmt.Println(err)
		return
	}
	err = db.AutoMigrate(&models.MonkeyTask{})
	if err != nil {
		fmt.Println(err)
		return
	}
}
