1
1
Fork
You've already forked api
0
No description
  • Go 85.4%
  • PLpgSQL 9.6%
  • Shell 3%
  • Lua 1.5%
  • Dockerfile 0.3%
  • Other 0.2%
Bora M. Alper e0c2fd884f
Some checks failed
ci/woodpecker/push/main Pipeline failed
Remove unique index place_osm ( #35 )
## What
The unique index `place_osm` that we have defined on `socialmaps.place (osm_type, osm_id)` was causing issues when an existing place was renamed.
## Why
For example, [Node #349283463](https://www.openstreetmap.org/node/349283463) was renamed from "Coffee Dock" to "Insomnia" in [changeset #182673214](https://www.openstreetmap.org/changeset/182673214). This meant that there were no matching `socialmaps.place` for the updated `osm2pgsql.element` with the new name (since we're matching places to elements using name + location). When `socialmaps-api` tried to create a new `place` for the given `element` returned in the resultset, it got a database error for trying to violate the uniqueness constraint of the index.
## Notes
We need to invest into handling changes to elements in the context of "place permanence". For instance, should the aforementioned rename ("Coffee Dock" → "Insomnia") result in a new place (I think so) or should we treat it as the same cafe and move its existing reviews over? There are no reviews of it at the moment, but we'll have to have a policy around such changes for future.
Reviewed-on: #35 
2026年06月05日 23:53:58 +02:00
.woodpecker Set up golangci-lint ( #33 ) 2026年06月01日 17:15:05 +02:00
api many changes 2025年10月07日 22:47:06 +01:00
assets Add osm2pgsql ( #20 ) 2026年02月28日 01:25:59 +01:00
cmd/socialmaps-api Use golang.org/x/crypto/x509roots/fallback ( #27 ) 2026年04月05日 00:45:33 +02:00
internal Remove unique index place_osm ( #35 ) 2026年06月05日 23:53:58 +02:00
scripts Set up golangci-lint ( #33 ) 2026年06月01日 17:15:05 +02:00
.envrc Add moderation ( #6 ) 2025年12月09日 01:04:26 +01:00
.gitignore Add moderation ( #6 ) 2025年12月09日 01:04:26 +01:00
.sqlfluff Add osm2pgsql ( #20 ) 2026年02月28日 01:25:59 +01:00
.sqlfluffignore Look up locally using the Osm2pgsql data instead of Nominatim ( #22 ) 2026年03月01日 16:34:13 +01:00
AGENTS.md Switch to PostgreSQL ( #16 ) 2026年02月27日 01:47:01 +01:00
COPYING License socialmaps-api under AGPL-3.0-only 2025年12月06日 14:19:08 +00:00
Dockerfile Bump Go from 1.26.2 to 1.26.3 ( #34 ) 2026年06月01日 14:42:07 +02:00
go.mod Bump Go from 1.26.2 to 1.26.3 ( #34 ) 2026年06月01日 14:42:07 +02:00
go.sum Use golang.org/x/crypto/x509roots/fallback ( #27 ) 2026年04月05日 00:45:33 +02:00
LICENSE License socialmaps-api under AGPL-3.0-only 2025年12月06日 14:19:08 +00:00
Makefile Switch to PostgreSQL ( #16 ) 2026年02月27日 01:47:01 +01:00
README.md License socialmaps-api under AGPL-3.0-only 2025年12月06日 14:19:08 +00:00
sqlc.yaml Add new endpoint "Query Places" and expose OSM data ( #23 ) 2026年03月15日 13:20:32 +01:00
staticcheck.conf Improve OpenAPI spec ( #13 ) 2026年02月14日 20:58:27 +01:00

Social Maps API

Developing

Install

Copying & License

SPDX-License-Identifier: AGPL-3.0-only

socialmaps-api — API server of Social Maps, a free social map
Copyright © 2025 socialmaps-api contributors

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.