mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Move DoMigration() after CreateTables()
This commit is contained in:
parent
e93d8c19d9
commit
cc566bf31f
4
main.go
4
main.go
@ -31,12 +31,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
createDatabase := flag.Bool("createDatabase", false, "true if you need Casdoor to create database")
|
createDatabase := *flag.Bool("createDatabase", false, "true if you need Casdoor to create database")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
object.InitAdapter()
|
object.InitAdapter()
|
||||||
|
object.CreateTables(createDatabase)
|
||||||
object.DoMigration()
|
object.DoMigration()
|
||||||
object.CreateTables(*createDatabase)
|
|
||||||
|
|
||||||
object.InitDb()
|
object.InitDb()
|
||||||
object.InitFromFile()
|
object.InitFromFile()
|
||||||
|
@ -41,8 +41,8 @@ func InitConfig() {
|
|||||||
beego.BConfig.WebConfig.Session.SessionOn = true
|
beego.BConfig.WebConfig.Session.SessionOn = true
|
||||||
|
|
||||||
InitAdapter()
|
InitAdapter()
|
||||||
DoMigration()
|
|
||||||
CreateTables(true)
|
CreateTables(true)
|
||||||
|
DoMigration()
|
||||||
}
|
}
|
||||||
|
|
||||||
func InitAdapter() {
|
func InitAdapter() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user