Mercurial > gemma
comparison pkg/imports/st.go @ 1995:59055c8301df
Move import queue to its own database namespace
Authorisation of the import queue has to be handled differently
from the waterway-related data in the waterway schema. This is
easier to handle, if both are in their own schema/namespace.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 24 Jan 2019 12:56:31 +0100 |
parents | f9f1babe52ae |
children | b868cb653c4d |
comparison
equal
deleted
inserted
replaced
1994:a7c4005b723f | 1995:59055c8301df |
---|---|
65 DELETE FROM waterway.stretches WHERE | 65 DELETE FROM waterway.stretches WHERE |
66 staging_done AND name = ( | 66 staging_done AND name = ( |
67 SELECT name | 67 SELECT name |
68 FROM waterway.stretches WHERE | 68 FROM waterway.stretches WHERE |
69 id = ( | 69 id = ( |
70 SELECT key from waterway.track_imports | 70 SELECT key from import.track_imports |
71 WHERE import_id = $1 AND | 71 WHERE import_id = $1 AND |
72 relation = 'waterway.stretches'::regclass) | 72 relation = 'waterway.stretches'::regclass) |
73 AND NOT staging_done | 73 AND NOT staging_done |
74 )` | 74 )` |
75 | 75 |
76 stStageDoneSQL = ` | 76 stStageDoneSQL = ` |
77 UPDATE waterway.stretches SET staging_done = true | 77 UPDATE waterway.stretches SET staging_done = true |
78 WHERE id IN ( | 78 WHERE id IN ( |
79 SELECT key from waterway.track_imports | 79 SELECT key from import.track_imports |
80 WHERE import_id = $1 AND | 80 WHERE import_id = $1 AND |
81 relation = 'waterway.stretches'::regclass)` | 81 relation = 'waterway.stretches'::regclass)` |
82 | 82 |
83 stInsertSQL = ` | 83 stInsertSQL = ` |
84 WITH r AS ( | 84 WITH r AS ( |