Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
d325a66f
Commit
d325a66f
authored
Aug 12, 2014
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update the error info
parent
fe9017c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
migration.go
migration/migration.go
+4
-0
No files found.
migration/migration.go
View file @
d325a66f
...
@@ -131,6 +131,7 @@ func Upgrade(lasttime int64) error {
...
@@ -131,6 +131,7 @@ func Upgrade(lasttime int64) error {
v
.
m
.
Up
()
v
.
m
.
Up
()
err
:=
v
.
m
.
Exec
(
v
.
name
,
"up"
)
err
:=
v
.
m
.
Exec
(
v
.
name
,
"up"
)
if
err
!=
nil
{
if
err
!=
nil
{
beego
.
Error
(
"execute error:"
,
err
)
return
err
return
err
}
}
beego
.
Info
(
"end upgrade:"
,
v
.
name
)
beego
.
Info
(
"end upgrade:"
,
v
.
name
)
...
@@ -148,6 +149,7 @@ func Rollback(name string) error {
...
@@ -148,6 +149,7 @@ func Rollback(name string) error {
v
.
Down
()
v
.
Down
()
err
:=
v
.
Exec
(
name
,
"down"
)
err
:=
v
.
Exec
(
name
,
"down"
)
if
err
!=
nil
{
if
err
!=
nil
{
beego
.
Error
(
"execute error:"
,
err
)
return
err
return
err
}
}
beego
.
Info
(
"end rollback"
)
beego
.
Info
(
"end rollback"
)
...
@@ -166,6 +168,7 @@ func Reset() error {
...
@@ -166,6 +168,7 @@ func Reset() error {
v
.
Down
()
v
.
Down
()
err
:=
v
.
Exec
(
k
,
"down"
)
err
:=
v
.
Exec
(
k
,
"down"
)
if
err
!=
nil
{
if
err
!=
nil
{
beego
.
Error
(
"execute error:"
,
err
)
return
err
return
err
}
}
beego
.
Info
(
"end reset:"
,
k
)
beego
.
Info
(
"end reset:"
,
k
)
...
@@ -178,6 +181,7 @@ func Reset() error {
...
@@ -178,6 +181,7 @@ func Reset() error {
func
Refresh
()
error
{
func
Refresh
()
error
{
err
:=
Reset
()
err
:=
Reset
()
if
err
!=
nil
{
if
err
!=
nil
{
beego
.
Error
(
"execute error:"
,
err
)
return
err
return
err
}
}
return
Upgrade
(
0
)
return
Upgrade
(
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment