Skip to content

Commit 814ea56

Browse files
committed
fix Beego issue 5719
1 parent 07a06e7 commit 814ea56

File tree

5 files changed

+52
-57
lines changed

5 files changed

+52
-57
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
}

go.mod

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
module github.com/beego/bee/v2
22

3-
go 1.18
3+
go 1.20
44

55
require (
6-
github.com/beego/beego/v2 v2.1.0
6+
github.com/beego/beego/v2 v2.3.3
77
github.com/davecgh/go-spew v1.1.1
88
github.com/flosch/pongo2 v0.0.0-20200529170236-5abacdfa4915
99
github.com/fsnotify/fsnotify v1.4.9
1010
github.com/go-delve/delve v1.20.2
11-
github.com/go-sql-driver/mysql v1.7.0
11+
github.com/go-sql-driver/mysql v1.8.1
1212
github.com/gorilla/websocket v1.4.2
1313
github.com/lib/pq v1.10.5
1414
github.com/pelletier/go-toml v1.9.2
1515
github.com/shopspring/decimal v1.3.1
1616
github.com/smartwalle/pongo2render v1.0.1
1717
github.com/spf13/viper v1.7.0
18-
golang.org/x/tools v0.1.12
18+
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d
1919
gopkg.in/yaml.v2 v2.4.0
2020
)
2121

2222
require (
23+
filippo.io/edwards25519 v1.1.0 // indirect
2324
github.com/beorn7/perks v1.0.1 // indirect
2425
github.com/cespare/xxhash/v2 v2.2.0 // indirect
2526
github.com/cilium/ebpf v0.7.0 // indirect
2627
github.com/cosiner/argv v0.1.0 // indirect
2728
github.com/derekparker/trie v0.0.0-20221213183930-4c74548207f4 // indirect
2829
github.com/go-delve/liner v1.2.3-0.20220127212407-d32d89dd2a5d // indirect
29-
github.com/golang/protobuf v1.5.3 // indirect
3030
github.com/google/go-dap v0.7.0 // indirect
3131
github.com/hashicorp/golang-lru v0.5.4 // indirect
3232
github.com/hashicorp/hcl v1.0.0 // indirect
@@ -35,13 +35,11 @@ require (
3535
github.com/mattn/go-colorable v0.0.9 // indirect
3636
github.com/mattn/go-isatty v0.0.3 // indirect
3737
github.com/mattn/go-runewidth v0.0.13 // indirect
38-
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
3938
github.com/mitchellh/mapstructure v1.5.0 // indirect
40-
github.com/pkg/errors v0.9.1 // indirect
41-
github.com/prometheus/client_golang v1.15.1 // indirect
42-
github.com/prometheus/client_model v0.3.0 // indirect
43-
github.com/prometheus/common v0.42.0 // indirect
44-
github.com/prometheus/procfs v0.9.0 // indirect
39+
github.com/prometheus/client_golang v1.19.0 // indirect
40+
github.com/prometheus/client_model v0.5.0 // indirect
41+
github.com/prometheus/common v0.48.0 // indirect
42+
github.com/prometheus/procfs v0.12.0 // indirect
4543
github.com/rivo/uniseg v0.2.0 // indirect
4644
github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect
4745
github.com/sirupsen/logrus v1.6.0 // indirect
@@ -52,12 +50,13 @@ require (
5250
github.com/subosito/gotenv v1.2.0 // indirect
5351
go.starlark.net v0.0.0-20220816155156-cfacd8902214 // indirect
5452
golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4 // indirect
55-
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
56-
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
57-
golang.org/x/net v0.7.0 // indirect
58-
golang.org/x/sys v0.6.0 // indirect
59-
golang.org/x/text v0.7.0 // indirect
60-
google.golang.org/protobuf v1.30.0 // indirect
53+
golang.org/x/crypto v0.24.0 // indirect
54+
golang.org/x/mod v0.17.0 // indirect
55+
golang.org/x/net v0.25.0 // indirect
56+
golang.org/x/sync v0.7.0 // indirect
57+
golang.org/x/sys v0.21.0 // indirect
58+
golang.org/x/text v0.16.0 // indirect
59+
google.golang.org/protobuf v1.34.2 // indirect
6160
gopkg.in/ini.v1 v1.51.0 // indirect
6261
gopkg.in/yaml.v3 v3.0.1 // indirect
6362
)

0 commit comments

Comments
 (0)