You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
393 B

4 years ago
  1. package main
  2. import (
  3. "git.aiterp.net/lucifer/new-server/app/config"
  4. "github.com/pressly/goose"
  5. "log"
  6. )
  7. func main() {
  8. db := config.DBX().DB
  9. log.Println("Host: " + config.MySqlHost())
  10. log.Println("Schema: " + config.MySqlUsername())
  11. err := goose.SetDialect("mysql")
  12. if err != nil {
  13. log.Fatal(err)
  14. }
  15. err = goose.Run("up", db, "./scripts")
  16. if err != nil {
  17. log.Fatal(err)
  18. }
  19. }