1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-18 08:26:45 +02:00
woodpecker/store/datastore/sql/postgres/files
Niall Sheridan 4949047575 Don't return extra columns in result set
Since commit 360708e93d the feed-latest-build query has returned extra columns in the results, causing log messages like the following:

```
meddler.Targets: column [build_repo_id] not found in struct
meddler.Targets: column [build_id] not found in struct
meddler.WriteTargets: column [build_repo_id] not found in struct
meddler.WriteTargets: column [build_id] not found in struct
```

This is a result of the optimised Postgres query including the `build_repo_id` and `build_id` terms, where previously they were not inclued.
This PR rewrites the query slightly to produce the expected result set (i.e. without the `build_repo_id` and `build_id` columns). As a side-effect it also looks similar to the original query.

Signed-off-by: Niall Sheridan <nsheridan@squarespace.com>
2018-11-14 11:22:28 +00:00
..
config.sql simplify gating logic 2017-05-05 20:05:42 +02:00
counts.sql alternate build count strategy for postgres 2018-05-02 09:45:05 -07:00
feed.sql Don't return extra columns in result set 2018-11-14 11:22:28 +00:00
files.sql capture file metadata 2017-08-02 16:04:00 -04:00
logs.sql read user and log sql queries from file 2017-07-20 16:34:52 -04:00
perms.sql sync working with postgres and mysql 2017-07-15 12:51:02 -04:00
procs.sql sort by proc_id asc 2017-05-19 17:54:13 +02:00
registry.sql add registry management 2017-04-06 21:51:01 +09:00
repos.sql sync working with postgres and mysql 2017-07-15 12:51:02 -04:00
secret.sql wip enable pluggable secret and registry backends 2017-04-11 19:06:45 +02:00
sender.sql wip enable pluggable secret and registry backends 2017-04-11 19:06:45 +02:00
tasks.sql restore queue on restart 2017-04-14 13:32:36 +02:00
users.sql read user and log sql queries from file 2017-07-20 16:34:52 -04:00