mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-14 19:21:46 +03:00
allow no tables.
This commit is contained in:
parent
966b49fb77
commit
7c71b0d826
5
main.go
5
main.go
@ -75,14 +75,11 @@ func initClient() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("Checking tables...")
|
fmt.Println("Checking tables...")
|
||||||
tables, err := client.Tables()
|
_, err = client.Tables()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
exitWithMessage(err.Error())
|
exitWithMessage(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(tables) == 0 {
|
|
||||||
exitWithMessage("Database does not have any tables")
|
|
||||||
}
|
|
||||||
|
|
||||||
dbClient = client
|
dbClient = client
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user