Mercurial > gemma
diff pkg/controllers/importconfig.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 | 4c21ff668b01 |
children | 25967829cf00 |
line wrap: on
line diff
--- a/pkg/controllers/importconfig.go Thu Jan 24 12:50:17 2019 +0100 +++ b/pkg/controllers/importconfig.go Thu Jan 24 12:56:31 2019 +0100 @@ -39,7 +39,7 @@ send_email, cron, url -FROM waterway.import_configuration` +FROM import.import_configuration` selectImportConfigurationSQL = selectImportConfigurationPrefix + ` ORDER by id` @@ -48,30 +48,30 @@ WHERE id = $1` insertImportConfigurationSQL = ` -INSERT INTO waterway.import_configuration +INSERT INTO import.import_configuration (username, kind, cron, send_email, url) VALUES ($1, $2, $3, $4, $5) RETURNING id` insertImportConfigurationAttributeSQL = ` -INSERT INTO waterway.import_configuration_attributes +INSERT INTO import.import_configuration_attributes (import_configuration_id, k, v) VALUES ($1, $2, $3)` hasImportConfigurationSQL = ` -SELECT true FROM waterway.import_configuration +SELECT true FROM import.import_configuration WHERE id = $1` deleteImportConfiguationAttributesSQL = ` -DELETE FROM waterway.import_configuration_attributes +DELETE FROM import.import_configuration_attributes WHERE import_configuration_id = $1` deleteImportConfiguationSQL = ` -DELETE FROM waterway.import_configuration +DELETE FROM import.import_configuration WHERE id = $1` updateImportConfigurationSQL = ` -UPDATE waterway.import_configuration SET +UPDATE import.import_configuration SET username = $2, kind = $3, cron = $4,