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() {
|
||||
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()
|
||||
|
||||
object.InitAdapter()
|
||||
object.CreateTables(createDatabase)
|
||||
object.DoMigration()
|
||||
object.CreateTables(*createDatabase)
|
||||
|
||||
object.InitDb()
|
||||
object.InitFromFile()
|
||||
|
@ -41,8 +41,8 @@ func InitConfig() {
|
||||
beego.BConfig.WebConfig.Session.SessionOn = true
|
||||
|
||||
InitAdapter()
|
||||
DoMigration()
|
||||
CreateTables(true)
|
||||
DoMigration()
|
||||
}
|
||||
|
||||
func InitAdapter() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user