mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
feat: fix createDatabase arg not recognized bug
This commit is contained in:
parent
4f5396c70e
commit
ff87c4ea33
9
main.go
9
main.go
@ -30,9 +30,14 @@ import (
|
|||||||
"github.com/casdoor/casdoor/util"
|
"github.com/casdoor/casdoor/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func getCreateDatabaseFlag() bool {
|
||||||
createDatabase := *flag.Bool("createDatabase", false, "true if you need Casdoor to create database")
|
res := flag.Bool("createDatabase", false, "true if you need Casdoor to create database")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
return *res
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
createDatabase := getCreateDatabaseFlag()
|
||||||
|
|
||||||
object.InitAdapter()
|
object.InitAdapter()
|
||||||
object.CreateTables(createDatabase)
|
object.CreateTables(createDatabase)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user