Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
14cd9e51
authored
2014-08-14 11:54:15 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
revert the sort map for reset
1 parent
886bb782
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
migration/migration.go
migration/migration.go
View file @
14cd9e5
...
...
@@ -176,7 +176,8 @@ func Rollback(name string) error {
func
Reset
()
error
{
sm
:=
sortMap
(
migrationMap
)
i
:=
0
for
_
,
v
:=
range
sm
{
for
j
:=
len
(
sm
)
-
1
;
j
>=
0
;
j
--
{
v
:=
sm
[
j
]
if
isRollBack
(
v
.
name
)
{
beego
.
Info
(
"skip the"
,
v
.
name
)
time
.
Sleep
(
1
*
time
.
Second
)
...
...
@@ -206,7 +207,8 @@ func Refresh() error {
time
.
Sleep
(
2
*
time
.
Second
)
return
err
}
return
Upgrade
(
0
)
err
=
Upgrade
(
0
)
return
err
}
type
dataSlice
[]
data
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment