mirror of
https://github.com/beego/bee.git
synced 2024-12-05 01:41:28 +00:00
fix Beego issue 5719
This commit is contained in:
parent
2dac032c00
commit
388b9a0741
@ -300,6 +300,7 @@ func writeMigrationSourceFile(dir, source, driver, connStr string, latestTime in
|
|||||||
// buildMigrationBinary changes directory to database/migrations folder and go-build the source
|
// buildMigrationBinary changes directory to database/migrations folder and go-build the source
|
||||||
func buildMigrationBinary(dir, binary string) {
|
func buildMigrationBinary(dir, binary string) {
|
||||||
changeDir(dir)
|
changeDir(dir)
|
||||||
|
_ = exec.Command("go", "mod", "tidy").Run()
|
||||||
cmd := exec.Command("go", "build", "-o", binary)
|
cmd := exec.Command("go", "build", "-o", binary)
|
||||||
if out, err := cmd.CombinedOutput(); err != nil {
|
if out, err := cmd.CombinedOutput(); err != nil {
|
||||||
beeLogger.Log.Errorf("Could not build migration binary: %s", err)
|
beeLogger.Log.Errorf("Could not build migration binary: %s", err)
|
||||||
|
@ -27,7 +27,7 @@ import (
|
|||||||
const confVer = 0
|
const confVer = 0
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Version = "2.1.0"
|
Version = "2.3.0"
|
||||||
GitRemotePath = "github.com/beego/bee/v2"
|
GitRemotePath = "github.com/beego/bee/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -46,5 +46,5 @@ func GenerateScaffold(sname, fields, currpath, driver, conn string) {
|
|||||||
if utils.AskForConfirmation() {
|
if utils.AskForConfirmation() {
|
||||||
migrate.MigrateUpdate(currpath, driver, conn, "")
|
migrate.MigrateUpdate(currpath, driver, conn, "")
|
||||||
}
|
}
|
||||||
beeLogger.Log.Successf("All done! Don't forget to add beego.Router(\"/%s\" ,&controllers.%sController{}) to routers/route.go\n", sname, strings.Title(sname))
|
beeLogger.Log.Successf("All done! Don't forget to add beego.AutoPrefix(\"/%s\" ,&controllers.%sController{}) to routers/route.go\n", sname, strings.Title(sname))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user