Skip to content

Commit 9a4f494

Browse files
Update SQL schema for OSMLeisure
1 parent 2dae2e8 commit 9a4f494

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

OSMLeisure/schema.sql

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* (Beta) Export of data model OSMLeisure of the subject dataModel.OpenStreetMap
2+
for a PostgreSQL database. Pending translation of enumerations and multityped attributes */
3+
CREATE TYPE access_type AS ENUM ('yes', 'private', 'permissive', 'customers', 'no');
4+
CREATE TYPE leisureType_type AS ENUM ('park', 'pitch', 'swimming_pool', 'sports_centre', 'stadium', 'playground', 'garden', 'nature_reserve', 'marina', 'golf_course', 'track', 'fitness_centre', 'fitness_station', 'ice_rink', 'dance', 'water_park', 'miniature_golf', 'bowling_alley', 'slipway', 'resort');
5+
CREATE TYPE osmType_type AS ENUM ('node', 'way', 'relation');
6+
CREATE TYPE OSMLeisure_type AS ENUM ('OSMLeisure');
7+
CREATE TYPE wheelchair_type AS ENUM ('yes', 'no', 'limited');
8+
9+
CREATE TABLE OSMLeisure (
10+
access access_type,
11+
address JSON,
12+
alternateName TEXT,
13+
areaServed TEXT,
14+
dataProvider TEXT,
15+
dateCreated TIMESTAMP,
16+
dateModified TIMESTAMP,
17+
description TEXT,
18+
fee BOOLEAN,
19+
id TEXT PRIMARY KEY,
20+
leisureType leisureType_type,
21+
lit BOOLEAN,
22+
location JSON,
23+
name TEXT,
24+
openingHours TEXT,
25+
operator TEXT,
26+
osmId NUMERIC,
27+
osmLastModified TIMESTAMP,
28+
osmType osmType_type,
29+
owner JSON,
30+
seeAlso JSON,
31+
source TEXT,
32+
sport TEXT,
33+
surface TEXT,
34+
type OSMLeisure_type,
35+
wheelchair wheelchair_type
36+
);

0 commit comments

Comments
 (0)