Created
January 29, 2012 11:43
-
-
Save chanmix51/1698430 to your computer and use it in GitHub Desktop.
Weather schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- PostgreSQL database dump | |
-- | |
SET statement_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = off; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; | |
SET escape_string_warning = off; | |
-- | |
-- Name: weather; Type: SCHEMA; Schema: -; Owner: - | |
-- | |
CREATE SCHEMA weather; | |
SET search_path = weather, pg_catalog; | |
SET default_tablespace = ''; | |
SET default_with_oids = false; | |
-- | |
-- Name: city; Type: TABLE; Schema: weather; Owner: -; Tablespace: | |
-- | |
CREATE TABLE city ( | |
name character varying NOT NULL, | |
coords point NOT NULL | |
); | |
-- | |
-- Name: weather_probe; Type: TABLE; Schema: weather; Owner: -; Tablespace: | |
-- | |
CREATE TABLE weather_probe ( | |
city_name character varying, | |
created_at timestamp without time zone DEFAULT now(), | |
temperature integer NOT NULL, | |
wind_direction character(2) NOT NULL, | |
wind_speed integer NOT NULL, | |
humidity smallint NOT NULL, | |
condition character varying NOT NULL, | |
CONSTRAINT weather_probe_wind_speed_check CHECK ((wind_speed >= 0)) | |
); | |
-- | |
-- Data for Name: city; Type: TABLE DATA; Schema: weather; Owner: - | |
-- | |
COPY city (name, coords) FROM stdin; | |
brest (48.383000000000003,-4.5) | |
quimper (48,-4.0999999999999996) | |
lorient (47.75,-3.3500000000000001) | |
saint-brieuc (48.517000000000003,-2.75) | |
vannes (47.667000000000002,-2.7330000000000001) | |
saint nazaire (47.283000000000001,-2.2000000000000002) | |
rennes (48.100000000000001,-1.667) | |
cherbourg (49.633000000000003,-1.617) | |
nantes (47.232999999999997,-1.583) | |
la-roche-sur-yon (46.633000000000003,-1.5) | |
bayonne (43.5,-1.4670000000000001) | |
la rochelle (46.167000000000002,-1.167) | |
st-lo (49.116999999999997,-1.083) | |
laval (48.067,-0.75) | |
bordeaux (44.832999999999998,-0.56699999999999995) | |
angers (47.482999999999997,-0.53300000000000003) | |
mont-de-marsan (43.899999999999999,-0.5) | |
niort (46.317,-0.45000000000000001) | |
pau (43.299999999999997,-0.36699999999999999) | |
caen (49.183,-0.36699999999999999) | |
alençon (48.417000000000002,0.083000000000000004) | |
tarbes (43.232999999999997,0.083000000000000004) | |
le havre (49.5,0.10000000000000001) | |
angouleme (45.667000000000002,0.16700000000000001) | |
le mans (48,0.20000000000000001) | |
poitiers (46.582999999999998,0.33300000000000002) | |
cahors (44.466999999999999,0.433) | |
auch (43.5,0.59999999999999998) | |
agen (44.200000000000003,0.63300000000000001) | |
tours (47.383000000000003,0.69999999999999996) | |
perigueux (45.200000000000003,0.73299999999999998) | |
dieppe (49.917000000000002,1.083) | |
rouen (49.433,1.083) | |
evreux (49.049999999999997,1.1830000000000001) | |
limoges (45.832999999999998,1.25) | |
montauban (44.017000000000003,1.333) | |
blois (47.600000000000001,1.333) | |
toulouse (43.616999999999997,1.45) | |
chartres (48.450000000000003,1.5) | |
foix (42.950000000000003,1.583) | |
chateauroux (46.817,1.6830000000000001) | |
tulle (45.267000000000003,1.7669999999999999) | |
abbeville (50.100000000000001,1.8500000000000001) | |
gueret (46.167000000000002,1.8660000000000001) | |
orleans (47.899999999999999,1.8999999999999999) | |
vierzon (47.232999999999997,2.0499999999999998) | |
pontoise (49.049999999999997,2.0830000000000002) | |
beauvais (49.433,2.0830000000000002) | |
versailles (48.799999999999997,2.133) | |
albi (43.933,2.1440000000000001) | |
nanterre (48.883000000000003,2.2170000000000001) | |
amiens (49.899999999999999,2.2999999999999998) | |
paris (48.832999999999998,2.3330000000000002) | |
bourges (47.082999999999998,2.383) | |
carcassonne (43.216999999999999,2.3500000000000001) | |
dunkerque (51.033000000000001,2.383) | |
aurillac (44.933,2.4329999999999998) | |
bobigny (48.917000000000002,2.4500000000000002) | |
créteil (48.783000000000001,2.4670000000000001) | |
melun (48.533000000000001,2.5569999999999999) | |
evry (48.633000000000003,2.5670000000000002) | |
rodez (44.350000000000001,2.5670000000000002) | |
montlucon (46.332999999999998,2.6000000000000001) | |
arras (50.283000000000001,2.7669999999999999) | |
lens (50.433,2.8330000000000002) | |
perpignan (42.700000000000003,2.8999999999999999) | |
lille (50.649999999999999,3.0830000000000002) | |
clermont-ferrand (45.783000000000001,3.0830000000000002) | |
nevers (47,3.1499999999999999) | |
moulins (46.567,3.3330000000000002) | |
mende (44.533000000000001,3.5) | |
auxerre (47.799999999999997,3.5830000000000002) | |
laon (49.567,3.617) | |
montpellier (43.600000000000001,3.883) | |
le puy (45.049999999999997,3.883) | |
avallon (47.5,3.8999999999999999) | |
reims (49.25,4.0330000000000004) | |
troyes (48.299999999999997,4.0830000000000002) | |
roanne (46.033000000000001,4.0830000000000002) | |
nimes (43.5,4.3499999999999996) | |
chalons-s-marne (48.966999999999999,4.367) | |
st-etienne (45.433,4.383) | |
privas (44.732999999999997,4.5999999999999996) | |
mezières (49.767000000000003,4.7329999999999997) | |
avignon (43.933,4.7999999999999998) | |
lyon (45.767000000000003,4.8330000000000002) | |
macon (45.299999999999997,4.8330000000000002) | |
valence (44.933,4.9000000000000004) | |
dijon (47.332999999999998,5.0330000000000004) | |
chaumont (48.116999999999997,5.133) | |
bar-le-duc (48.767000000000003,5.1669999999999998) | |
bourg (46.200000000000003,5.2169999999999996) | |
marseille (43.299999999999997,5.367) | |
lons-le-saunier (46.683,5.5499999999999998) | |
grenoble (45.183,5.7169999999999996) | |
toulon (43.116999999999997,5.9169999999999998) | |
chambéry (45.567,5.9169999999999998) | |
besancon (47.25,5.9829999999999997) | |
gap (44.549999999999997,6.0830000000000002) | |
annecy (45.899999999999999,6.117) | |
metz (49.116999999999997,6.1829999999999998) | |
vesoul (47.633000000000003,6.1500000000000004) | |
nancy (48.700000000000003,6.2000000000000002) | |
digne (44.082999999999998,6.2329999999999997) | |
epinal (48.167000000000002,6.4669999999999996) | |
belfort (47.633000000000003,6.867) | |
cannes (43.549999999999997,7) | |
nice (43.700000000000003,7.2670000000000003) | |
colmar (48.082999999999998,7.3499999999999996) | |
mulhouse (47.75,7.3499999999999996) | |
strasbourg (48.582999999999998,7.75) | |
ajaccio (41.917000000000002,8.7170000000000005) | |
bastia (42.683,9.4329999999999998) | |
\. | |
-- | |
-- Name: city_pkey; Type: CONSTRAINT; Schema: weather; Owner: -; Tablespace: | |
-- | |
ALTER TABLE ONLY city | |
ADD CONSTRAINT city_pkey PRIMARY KEY (name); | |
-- | |
-- Name: weather_probe_city_name_fkey; Type: FK CONSTRAINT; Schema: weather; Owner: - | |
-- | |
ALTER TABLE ONLY weather_probe | |
ADD CONSTRAINT weather_probe_city_name_fkey FOREIGN KEY (city_name) REFERENCES city(name); | |
-- | |
-- PostgreSQL database dump complete | |
-- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment