Skip to content

Commit 388b9a0

Browse files
committed
fix Beego issue 5719
1 parent 2dac032 commit 388b9a0

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

cmd/commands/migrate/migrate.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// not use this file except in compliance with the License. You may obtain
55
// a copy of the License at
66
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
7+
// http://www.apache.org/licenses/LICENSE-2.0
88
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
@@ -300,6 +300,7 @@ func writeMigrationSourceFile(dir, source, driver, connStr string, latestTime in
300300
// buildMigrationBinary changes directory to database/migrations folder and go-build the source
301301
func buildMigrationBinary(dir, binary string) {
302302
changeDir(dir)
303+
_ = exec.Command("go", "mod", "tidy").Run()
303304
cmd := exec.Command("go", "build", "-o", binary)
304305
if out, err := cmd.CombinedOutput(); err != nil {
305306
beeLogger.Log.Errorf("Could not build migration binary: %s", err)

config/conf.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
const confVer = 0
2828

2929
const (
30-
Version = "2.1.0"
30+
Version = "2.3.0"
3131
GitRemotePath = "github.com/beego/bee/v2"
3232
)
3333

generate/g_scaffold.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ func GenerateScaffold(sname, fields, currpath, driver, conn string) {
4646
if utils.AskForConfirmation() {
4747
migrate.MigrateUpdate(currpath, driver, conn, "")
4848
}
49-
beeLogger.Log.Successf("All done! Don't forget to add beego.Router(\"/%s\" ,&controllers.%sController{}) to routers/route.go\n", sname, strings.Title(sname))
49+
beeLogger.Log.Successf("All done! Don't forget to add beego.AutoPrefix(\"/%s\" ,&controllers.%sController{}) to routers/route.go\n", sname, strings.Title(sname))
5050
}

0 commit comments

Comments
 (0)