Skip to content

Commit 54f1c08

Browse files
committed
add missing sql file
1 parent 0a7473a commit 54f1c08

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

liquibase/changes/feat_1124.sql

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
-- Insert a GbfsEndpoint row to GbfsVersions that miss the gbfs(autodiscovery) endpoint
2+
INSERT INTO GbfsEndpoint (id, gbfs_version_id, url, name, is_feature)
3+
SELECT
4+
Feed.stable_id || '_' || GbfsVersion.version AS id,
5+
GbfsVersion.id AS gbfs_version_id,
6+
GbfsVersion.url AS url,
7+
'gbfs' AS name,
8+
false AS is_feature -- gbfs file is not a feature, see https://github.com/MobilityData/mobility-feed-api/issues/1125
9+
FROM GbfsVersion
10+
JOIN GbfsFeed ON GbfsVersion.feed_id = GbfsFeed.id
11+
JOIN Feed ON GbfsFeed.id = Feed.id
12+
WHERE NOT EXISTS (
13+
SELECT 1
14+
FROM GbfsEndpoint
15+
WHERE GbfsEndpoint.gbfs_version_id = GbfsVersion.id
16+
AND GbfsEndpoint.name = 'gbfs'
17+
);

0 commit comments

Comments
 (0)