forked from MapComplete/MapComplete
Scripts: fix delete
This commit is contained in:
parent
1ddfffcee0
commit
a018f15466
2 changed files with 6 additions and 2 deletions
|
@ -13,7 +13,7 @@ class CreateNewDatabase extends Script {
|
|||
const overwrite = args[1] === "--overwrite"
|
||||
const db = new OsmPoiDatabase("postgresql://user:password@localhost:5444")
|
||||
const knownDatabases = await db.findSuitableDatabases()
|
||||
if (knownDatabases.indexOf(targetName) > 0) {
|
||||
if (knownDatabases.indexOf(OsmPoiDatabase.databaseNameFor(targetName)) > 0) {
|
||||
if (overwrite) {
|
||||
await db.deleteDatabase(targetName)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue