Associate correct schema when recreating a survey

This commit is contained in:
D. Berge
2020-09-02 18:58:50 +02:00
parent fb947dcf9f
commit c7cee0b822

View File

@@ -61,13 +61,13 @@ os.system(cmd)
#cmd = f"psql dougal -c 'DROP schema {schema} CASCADE;'" #cmd = f"psql dougal -c 'DROP schema {schema} CASCADE;'"
#print(cmd) #print(cmd)
for survey in configuration.surveys(): for survey in configuration.surveys(include_archived=True):
id = survey["id"].lower() id = survey["id"].lower()
name = survey["name"] name = survey["name"]
epsg = survey["epsg"] epsg = survey["epsg"]
schema = survey["schema"] schema = survey["schema"]
cmd = f"{create_survey} \"{id}\" \"{name}\" {epsg}" cmd = f"SCHEMA_NAME={schema} {create_survey} \"{id}\" \"{name}\" {epsg}"
print(cmd) print(cmd)
os.system(cmd) os.system(cmd)