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
456 B

4 years ago
4 years ago
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.Printf("Database: %s:%d/%s", config.MySqlHost(), config.MySqlPort(), config.MySqlSchema())
  10. log.Printf("Authenticating as: %s", 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. }