We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64afaed commit af64419Copy full SHA for af64419
examples/basic/xorm/main.go
@@ -8,7 +8,6 @@ import (
8
9
_ "github.com/lib/pq"
10
_ "modernc.org/sqlite"
11
-
12
"xorm.io/builder"
13
"xorm.io/xorm"
14
xormLog "xorm.io/xorm/log"
@@ -72,13 +71,13 @@ func main() {
72
71
}
73
74
func prepareScheme(db *xorm.Engine) error {
75
- if err := db.DropTables(&Series{}, &Seasons{}, &Episodes{}); err != nil {
76
- return err
77
- }
78
- if err := db.CreateTables(&Series{}, &Seasons{}, &Episodes{}); err != nil {
+ err := db.DropTables(&Series{}, &Seasons{}, &Episodes{})
+ if err != nil {
79
return err
80
81
- return nil
+
+ err = db.CreateTables(&Series{}, &Seasons{}, &Episodes{})
+ return err
82
83
84
func fillData(db *xorm.Engine) error {
0 commit comments