From: Tom Hughes Date: Sat, 1 Nov 2014 12:46:42 +0000 (+0000) Subject: Merge branch 'master' into overpass X-Git-Tag: live~5190^2~7 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/501d13e1c0936cc3ba3d9639620517bae34e5784?hp=-c Merge branch 'master' into overpass --- 501d13e1c0936cc3ba3d9639620517bae34e5784 diff --combined app/assets/javascripts/index.js index 236ed44fc,0cf08f845..191f390bf --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@@ -5,7 -5,6 +5,7 @@@ //= require leaflet.key //= require leaflet.note //= require leaflet.share +//= require leaflet.query //= require index/search //= require index/browse //= require index/export @@@ -13,7 -12,7 +13,8 @@@ //= require index/history //= require index/note //= require index/new_note + //= require index/changeset +//= require index/query //= require router (function() { @@@ -125,11 -124,6 +126,11 @@@ $(document).ready(function () sidebar: sidebar }).addTo(map); + L.OSM.query({ + position: position, + sidebar: sidebar + }).addTo(map); + L.control.scale() .addTo(map); @@@ -161,6 -155,15 +162,15 @@@ $.cookie("_osm_location", OSM.locationCookie(map), { expires: expiry, path: "/" }); }); + if ($.cookie('_osm_sotm') == 'hide') { + $('#sotm').hide(); + } + + $('#sotm .close').on('click', function() { + $('#sotm').hide(); + $.cookie("_osm_sotm", 'hide', { expires: expiry }); + }); + if ($.cookie('_osm_welcome') == 'hide') { $('.welcome').hide(); } @@@ -302,8 -305,7 +312,8 @@@ "/node/:id(/history)": OSM.Browse(map, 'node'), "/way/:id(/history)": OSM.Browse(map, 'way'), "/relation/:id(/history)": OSM.Browse(map, 'relation'), - "/changeset/:id": OSM.Browse(map, 'changeset'), - "/changeset/:id": OSM.Changeset(map) ++ "/changeset/:id": OSM.Changeset(map), + "/query": OSM.Query(map) }); if (OSM.preferred_editor == "remote" && document.location.pathname == "/edit") { @@@ -336,7 -338,7 +346,7 @@@ if (query) { OSM.router.route("/search?query=" + encodeURIComponent(query) + OSM.formatHash(map)); } else { - OSM.router.route("/" + OSM.formatHash(map)); + OSM.router.route("/"); } }); diff --combined app/assets/stylesheets/common.css.scss index d3268f43b,37a6aa7a9..ef2d9c00d --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@@ -87,9 -87,7 +87,7 @@@ strong /* Default rules for the body of every page */ * { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + box-sizing: border-box; } body { @@@ -171,7 -169,7 +169,7 @@@ small, aside .icon.close:hover { background-position: -200px -20px; } .icon.check { background-position: -220px 0; } .icon.note { background-position: -240px 0; } -.icon.gear { background-position: -260px 0; } +.icon.query { background-position: -260px 0; } /* Rules for links */ @@@ -464,9 -462,8 +462,8 @@@ nav.secondary #noscript { z-index: 20000000; - position: absolute; - top: 15px; - left: 15px; + margin-left: 400px; + margin-top: 50px; } /* Rules for bootstrap tooltips */ @@@ -683,14 -680,6 +680,14 @@@ #map { height: 100%; overflow: hidden; + + &.query-active { + cursor: help; + } + + &.query-disabled { + cursor: not-allowed; + } } #map-ui { @@@ -854,7 -843,6 +851,6 @@@ .leaflet-popup-content-wrapper { border-radius: 4px !important; - -webkit-border-radius: 4px !important; } /* Rules for attribution text under the main map shown on printouts */ @@@ -934,8 -922,6 +930,6 @@@ header .search_form border-right: none; transition: 300ms linear; - -webkit-transition: 300ms linear; - -moz-transition: 300ms linear; } input:focus { @@@ -1117,7 -1103,7 +1111,7 @@@ font-size: 90%; } - .note-comments li { + .note-comments li, .changeset-comments li { margin: $lineheight/2 0; p { @@@ -1125,42 -1111,31 +1119,63 @@@ } } + .comments-header { + float: left; + } + + .subscribe-buttons { + float: left; + margin: 18px 10px 10px; + min-width: 80px; + } + + .subscribe-buttons input { + font-size: 90%; + line-height: 15px; + min-height: 20px; + } + + span.action-button:hover { + cursor: pointer; + text-decoration: underline; + } + .note-description { overflow: hidden; margin: 0 0 10px 10px; } + + .query-intro p { + padding: $lineheight $lineheight $lineheight/2; + } + + .query-results { + display: none; + + h3 { + padding: $lineheight $lineheight $lineheight/2; + margin: 0; + } + + ul { + li { + padding: 15px 20px; + border-bottom: 1px solid #ddd; + + &.query-result { + cursor: pointer; + } + + &.selected { + background: #FFFFE6; + } + + a { + color: #000; + } + } + } + } } /* Rules for export sidebar */ @@@ -1361,6 -1336,30 +1376,30 @@@ } } + /* Rules for the new trace form */ + + #new_trace { + input[type=text] { + width: 50%; + width: calc(100% - 150px); + max-width: 500px; + } + } + + /* Rules for the edit trace form */ + + .edit_trace { + .form-row p { + margin-bottom: 0px; + } + + input[type=text] { + width: 50%; + width: calc(100% - 150px); + max-width: 500px; + } + } + /* Rules for the user profile page */ #userinformation { @@@ -1943,7 -1942,6 +1982,6 @@@ a.button cursor: pointer; border: 0; display: inline-block; - line-height: 20px; padding: $lineheight/4 $lineheight/2; min-height: 20px + $lineheight/2; min-width: 120px; @@@ -1952,7 -1950,6 +1990,6 @@@ background: $blue; text-align: center; border-radius: 2px; - -moz-border-radius: 2px; &:hover { background: darken($blue, $hovercolor); text-decoration: none; @@@ -1974,6 -1971,16 +2011,16 @@@ } } + input[type="button"], + input[type="submit"], + input[type="reset"] { + line-height: normal; + } + + a.button { + line-height: 20px; + } + .buttons { min-width: 200px; input[type="submit"], @@@ -2121,8 -2128,6 +2168,6 @@@ input.richtext_title[type="text"] { width: 50%; - width: -moz-calc(100% - 235px); - width: -webkit-calc(100% - 235px); width: calc(100% - 235px); @media only screen and (max-width:768px) { @@@ -2135,8 -2140,6 +2180,6 @@@ .richtext_content { width: 50%; - width: -moz-calc(100% - 235px); - width: -webkit-calc(100% - 235px); width: calc(100% - 235px); display: inline-block; vertical-align: top; @@@ -2271,12 -2274,8 +2314,8 @@@ border-radius: 0 3px 3px; *border-right-width: 2px; *border-bottom-width: 2px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + background-clip: padding-box; } .dropdown-menu.pull-right { @@@ -2566,6 -2565,36 +2605,36 @@@ } } + #sidebar #sotm { + padding: 10px; + min-height: 120px; + + img { + float: left; + width: 100px; + height: 100px; + } + + h2 { + margin-left: 100px; + padding: 7px 10px 6px 15px; + } + + p { + margin-left: 100px; + padding: 6px 10px 7px 15px; + } + + a { + color: $darkgrey; + } + + :hover { + text-decoration: none; + color: darken($darkgrey, 25%); + } + } + @import 'browse'; @media only screen and (max-width:960px) { diff --combined config/example.application.yml index 7f6aaf298,3fbebdc76..e7915c96b --- a/config/example.application.yml +++ b/config/example.application.yml @@@ -84,8 -84,11 +84,13 @@@ defaults: &default require_terms_seen: false # Whether to require users to agree to the CTs before editing require_terms_agreed: false + # Imagery to return in capabilities as blacklisted + imagery_blacklist: + - ".*\\.googleapis\\.com/.*" + - ".*\\.google\\.com/.*" + - ".*\\.google\\.ru/.*" + # URL of Overpass instance to use for feature queries + overpass_url: "//overpass-api.de/api/interpreter" development: <<: *defaults diff --combined config/locales/en.yml index eb2991d4e,021151052..69e52e44d --- a/config/locales/en.yml +++ b/config/locales/en.yml @@@ -121,11 -121,16 +121,16 @@@ en way_paginated: "Ways (%{x}-%{y} of %{count})" relation: "Relations (%{count})" relation_paginated: "Relations (%{x}-%{y} of %{count})" + comment: "Comments (%{count})" + hidden_commented_by: "Hidden comment from %{user} %{when} ago" + commented_by: "Comment from %{user} %{when} ago" changesetxml: "Changeset XML" osmchangexml: "osmChange XML" feed: title: "Changeset %{id}" title_comment: "Changeset %{id} - %{comment}" + join_discussion: "Log in to join the discussion" + discussion: Discussion node: title: "Node: %{name}" history_title: "Node History: %{name}" @@@ -180,6 -185,7 +185,7 @@@ wiki_link: key: "The wiki description page for the %{key} tag" tag: "The wiki description page for the %{key}=%{value} tag" + wikidata_link: "The %{page} item on Wikidata" wikipedia_link: "The %{page} article on Wikipedia" telephone_link: "Call %{phone_number}" note: @@@ -198,11 -204,6 +204,11 @@@ reopened_by: "Reactivated by %{user} %{when} ago" reopened_by_anonymous: "Reactivated by anonymous %{when} ago" hidden_by: "Hidden by %{user} %{when} ago" + query: + title: "Query Features" + introduction: "Click on the map to find nearby features." + nearby: "Nearby features" + enclosing: "Enclosing features" changeset: changeset_paging_nav: showing_page: "Page %{page}" @@@ -232,6 -233,13 +238,13 @@@ load_more: "Load more" timeout: sorry: "Sorry, the list of changesets you requested took too long to retrieve." + rss: + title_all: OpenStreetMap changeset discussion + title_particular: "OpenStreetMap changeset #%{changeset_id} discussion" + comment: "New comment on changeset #%{changeset_id} by %{author}" + commented_at_html: "Updated %{when} ago" + commented_at_by_html: "Updated %{when} ago by %{user}" + full: Full discussion diary_entry: new: title: New Diary Entry @@@ -513,7 -521,7 +526,7 @@@ primary_link: "Primary Road" proposed: "Proposed Road" raceway: "Raceway" - residential: "Residential" + residential: "Residential Road" rest_area: "Rest Area" road: "Road" secondary: "Secondary Road" @@@ -724,8 -732,6 +737,8 @@@ tram: "Tramway" tram_stop: "Tram Stop" yard: "Railway Yard" + route: + bus: "Bus Route" shop: alcohol: "Off License" antiques: "Antiques" @@@ -931,6 -937,10 +944,10 @@@ text: Make a Donation learn_more: "Learn More" more: More + sotm_header: State of the Map 2014 + sotm_line_1: 8th Annual Conference + sotm_line_2: November 7th-9th 2014 + sotm_line_3: Buenos Aires, Argentina license_page: foreign: title: About this translation @@@ -1236,6 -1246,16 +1253,16 @@@ your_note: "%{commenter} has reactivated one of your map notes near %{place}." commented_note: "%{commenter} has reactivated a map note you have commented on. The note is near %{place}." details: "More details about the note can be found at %{url}." + changeset_comment_notification: + greeting: "Hi," + commented: + subject_own: "[OpenStreetMap] %{commenter} has commented on one of your changesets" + subject_other: "[OpenStreetMap] %{commenter} has commented on a changeset you are interested in" + your_changeset: "%{commenter} has left a comment on one of your changesets created at %{time}" + commented_changeset: "%{commenter} has left a comment on a map changeset you are watching created by %{changeset_author} at %{time}" + partial_changeset_with_comment: "with comment '%{changeset_comment}'" + partial_changeset_without_comment: "without comment" + details: "More details about the changeset can be found at %{url}." message: inbox: title: "Inbox" @@@ -1651,9 -1671,6 +1678,6 @@@ yahoo: title: Login with Yahoo alt: Login with a Yahoo OpenID - myopenid: - title: Login with myOpenID - alt: Login with a myOpenID OpenID wordpress: title: Login with Wordpress alt: Login with a Wordpress OpenID @@@ -2109,8 -2126,13 +2133,15 @@@ createnote_disabled_tooltip: Zoom in to add a note to the map map_notes_zoom_in_tooltip: Zoom in to see map notes map_data_zoom_in_tooltip: Zoom in to see map data + queryfeature_tooltip: Query features + queryfeature_disabled_tooltip: Zoom in to query features + changesets: + show: + comment: "Comment" + subscribe: "Subscribe" + unsubscribe: "Unsubscribe" + hide_comment: "hide" + unhide_comment: "unhide" notes: new: intro: "Spotted a mistake or something missing? Let other mappers know so we can fix it. Move the marker to the correct position and type a note to explain the problem. (Please don't enter personal information or information from copyrighted maps or directory listings.)" @@@ -2123,13 -2145,6 +2154,13 @@@ comment_and_resolve: Comment & Resolve comment: Comment edit_help: Move the map and zoom in on a location you want to edit, then click here. + query: + node: Node + way: Way + relation: Relation + nothing_found: No features found + error: "Error contacting %{server}: %{error}" + timeout: "Timeout contacting %{server}" redaction: edit: description: "Description" diff --combined config/routes.rb index 9af0c1099,8cbf8f900..7084d1c8d --- a/config/routes.rb +++ b/config/routes.rb @@@ -8,10 -8,15 +8,15 @@@ OpenStreetMap::Application.routes.draw match 'api/0.6/changeset/:id/upload' => 'changeset#upload', :via => :post, :id => /\d+/ match 'api/0.6/changeset/:id/download' => 'changeset#download', :via => :get, :as => :changeset_download, :id => /\d+/ match 'api/0.6/changeset/:id/expand_bbox' => 'changeset#expand_bbox', :via => :post, :id => /\d+/ - match 'api/0.6/changeset/:id' => 'changeset#read', :via => :get, :as => :changeset_read, :via => :get, :id => /\d+/ + match 'api/0.6/changeset/:id' => 'changeset#read', :via => :get, :as => :changeset_read, :id => /\d+/ + match 'api/0.6/changeset/:id/subscribe' => 'changeset#subscribe', :via => :post, :as => :changeset_subscribe, :id => /\d+/ + match 'api/0.6/changeset/:id/unsubscribe' => 'changeset#unsubscribe', :via => :post, :as => :changeset_unsubscribe, :id => /\d+/ match 'api/0.6/changeset/:id' => 'changeset#update', :via => :put, :id => /\d+/ match 'api/0.6/changeset/:id/close' => 'changeset#close', :via => :put, :id => /\d+/ match 'api/0.6/changesets' => 'changeset#query', :via => :get + post 'api/0.6/changeset/:id/comment' => 'changeset#comment', :as => :changeset_comment, :id => /\d+/ + post 'api/0.6/changeset/comment/:id/hide' => 'changeset#hide_comment', :as => :changeset_comment_hide, :id => /\d+/ + post 'api/0.6/changeset/comment/:id/unhide' => 'changeset#unhide_comment', :as => :changeset_comment_unhide, :id => /\d+/ match 'api/0.6/node/create' => 'node#create', :via => :put match 'api/0.6/node/:id/ways' => 'way#ways_for_node', :via => :get, :id => /\d+/ @@@ -109,6 -114,7 +114,7 @@@ match '/relation/:id' => 'browse#relation', :via => :get, :id => /\d+/, :as => :relation match '/relation/:id/history' => 'browse#relation_history', :via => :get, :id => /\d+/ match '/changeset/:id' => 'browse#changeset', :via => :get, :as => :changeset, :id => /\d+/ + match '/changeset/:id/comments/feed' => 'changeset#comments_feed', :via => :get, :as => :changeset_comments_feed, :id => /\d*/, :defaults => { :format => 'rss' } match '/note/:id' => 'browse#note', :via => :get, :id => /\d+/, :as => "browse_note" match '/note/new' => 'browse#new_note', :via => :get match '/user/:display_name/history' => 'changeset#list', :via => :get @@@ -144,13 -150,13 +150,14 @@@ match '/about' => 'site#about', :via => :get, :as => :about match '/history' => 'changeset#list', :via => :get match '/history/feed' => 'changeset#feed', :via => :get, :defaults => { :format => :atom } + match '/history/comments/feed' => 'changeset#comments_feed', :via => :get, :as => :changesets_comments_feed, :defaults => { :format => 'rss' } match '/export' => 'site#export', :via => :get match '/login' => 'user#login', :via => [:get, :post] match '/logout' => 'user#logout', :via => [:get, :post] match '/offline' => 'site#offline', :via => :get match '/key' => 'site#key', :via => :get match '/id' => 'site#id', :via => :get + match '/query' => 'browse#query', :via => :get match '/user/new' => 'user#new', :via => :get match '/user/new' => 'user#create', :via => :post match '/user/terms' => 'user#terms', :via => :get diff --combined db/structure.sql index 1d6170bc4,c287baea3..343aec084 --- a/db/structure.sql +++ b/db/structure.sql @@@ -126,7 -126,7 +126,7 @@@ CREATE TYPE user_status_enum AS ENUM CREATE FUNCTION maptile_for_point(bigint, bigint, integer) RETURNS integer LANGUAGE c STRICT - AS '/srv/www/master.osm.compton.nu/db/functions/libpgosm.so', 'maptile_for_point'; - AS '/home/ukasiu/repos/openstreetmap-website/db/functions/libpgosm', 'maptile_for_point'; ++ AS '/srv/www/overpass.osm.compton.nu/db/functions/libpgosm.so', 'maptile_for_point'; -- @@@ -135,7 -135,7 +135,7 @@@ CREATE FUNCTION tile_for_point(integer, integer) RETURNS bigint LANGUAGE c STRICT - AS '/srv/www/master.osm.compton.nu/db/functions/libpgosm.so', 'tile_for_point'; - AS '/home/ukasiu/repos/openstreetmap-website/db/functions/libpgosm', 'tile_for_point'; ++ AS '/srv/www/overpass.osm.compton.nu/db/functions/libpgosm.so', 'tile_for_point'; -- @@@ -143,8 -143,8 +143,8 @@@ -- CREATE FUNCTION xid_to_int4(xid) RETURNS integer - LANGUAGE c STRICT - AS '/home/ukasiu/repos/openstreetmap-website/db/functions/libpgosm', 'xid_to_int4'; + LANGUAGE c IMMUTABLE STRICT - AS '/srv/www/master.osm.compton.nu/db/functions/libpgosm.so', 'xid_to_int4'; ++ AS '/srv/www/overpass.osm.compton.nu/db/functions/libpgosm.so', 'xid_to_int4'; SET default_tablespace = ''; @@@ -183,6 -183,39 +183,39 @@@ CREATE SEQUENCE acls_id_se ALTER SEQUENCE acls_id_seq OWNED BY acls.id; + -- + -- Name: changeset_comments; Type: TABLE; Schema: public; Owner: -; Tablespace: + -- + + CREATE TABLE changeset_comments ( + id integer NOT NULL, + changeset_id bigint NOT NULL, + author_id bigint NOT NULL, + body text NOT NULL, + created_at timestamp without time zone NOT NULL, + visible boolean NOT NULL + ); + + + -- + -- Name: changeset_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: - + -- + + CREATE SEQUENCE changeset_comments_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + + -- + -- Name: changeset_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - + -- + + ALTER SEQUENCE changeset_comments_id_seq OWNED BY changeset_comments.id; + + -- -- Name: changeset_tags; Type: TABLE; Schema: public; Owner: -; Tablespace: -- @@@ -230,6 -263,16 +263,16 @@@ CREATE SEQUENCE changesets_id_se ALTER SEQUENCE changesets_id_seq OWNED BY changesets.id; + -- + -- Name: changesets_subscribers; Type: TABLE; Schema: public; Owner: -; Tablespace: + -- + + CREATE TABLE changesets_subscribers ( + subscriber_id bigint NOT NULL, + changeset_id bigint NOT NULL + ); + + -- -- Name: client_applications; Type: TABLE; Schema: public; Owner: -; Tablespace: -- @@@ -698,7 -741,7 +741,7 @@@ CREATE TABLE nodes -- CREATE TABLE note_comments ( - id integer NOT NULL, + id bigint NOT NULL, note_id bigint NOT NULL, visible boolean NOT NULL, created_at timestamp without time zone NOT NULL, @@@ -733,7 -776,7 +776,7 @@@ ALTER SEQUENCE note_comments_id_seq OWN -- CREATE TABLE notes ( - id integer NOT NULL, + id bigint NOT NULL, latitude integer NOT NULL, longitude integer NOT NULL, tile bigint NOT NULL, @@@ -851,8 -894,8 +894,8 @@@ CREATE TABLE redactions id integer NOT NULL, title character varying(255), description text, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, user_id bigint NOT NULL, description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL ); @@@ -1064,9 -1107,9 +1107,9 @@@ CREATE TABLE users status user_status_enum DEFAULT 'pending'::user_status_enum NOT NULL, terms_agreed timestamp without time zone, consider_pd boolean DEFAULT false NOT NULL, + openid_url character varying(255), preferred_editor character varying(255), terms_seen boolean DEFAULT false NOT NULL, - openid_url character varying(255), description_format format_enum DEFAULT 'html'::format_enum NOT NULL, image_fingerprint character varying(255), changesets_count integer DEFAULT 0 NOT NULL, @@@ -1141,6 -1184,13 +1184,13 @@@ CREATE TABLE ways ALTER TABLE ONLY acls ALTER COLUMN id SET DEFAULT nextval('acls_id_seq'::regclass); + -- + -- Name: id; Type: DEFAULT; Schema: public; Owner: - + -- + + ALTER TABLE ONLY changeset_comments ALTER COLUMN id SET DEFAULT nextval('changeset_comments_id_seq'::regclass); + + -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- @@@ -1289,6 -1339,14 +1339,14 @@@ ALTER TABLE ONLY acl ADD CONSTRAINT acls_pkey PRIMARY KEY (id); + -- + -- Name: changeset_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: + -- + + ALTER TABLE ONLY changeset_comments + ADD CONSTRAINT changeset_comments_pkey PRIMARY KEY (id); + + -- -- Name: changesets_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- @@@ -1737,6 -1795,34 +1795,27 @@@ CREATE INDEX gpx_files_user_id_idx ON g CREATE INDEX gpx_files_visible_visibility_idx ON gpx_files USING btree (visible, visibility); --- --- Name: index_changeset_comments_on_body; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX index_changeset_comments_on_body ON changeset_comments USING btree (body); - - + -- + -- Name: index_changeset_comments_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: + -- + + CREATE INDEX index_changeset_comments_on_created_at ON changeset_comments USING btree (created_at); + + + -- + -- Name: index_changesets_subscribers_on_changeset_id; Type: INDEX; Schema: public; Owner: -; Tablespace: + -- + + CREATE INDEX index_changesets_subscribers_on_changeset_id ON changesets_subscribers USING btree (changeset_id); + + + -- + -- Name: index_changesets_subscribers_on_subscriber_id_and_changeset_id; Type: INDEX; Schema: public; Owner: -; Tablespace: + -- + + CREATE UNIQUE INDEX index_changesets_subscribers_on_subscriber_id_and_changeset_id ON changesets_subscribers USING btree (subscriber_id, changeset_id); + + -- -- Name: index_client_applications_on_key; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@@ -1968,6 -2054,22 +2047,22 @@@ CREATE INDEX ways_changeset_id_idx ON w CREATE INDEX ways_timestamp_idx ON ways USING btree ("timestamp"); + -- + -- Name: changeset_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - + -- + + ALTER TABLE ONLY changeset_comments + ADD CONSTRAINT changeset_comments_author_id_fkey FOREIGN KEY (author_id) REFERENCES users(id); + + + -- + -- Name: changeset_comments_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - + -- + + ALTER TABLE ONLY changeset_comments + ADD CONSTRAINT changeset_comments_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id); + + -- -- Name: changeset_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@@ -1976,6 -2078,22 +2071,22 @@@ ALTER TABLE ONLY changeset_tag ADD CONSTRAINT changeset_tags_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id); + -- + -- Name: changesets_subscribers_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - + -- + + ALTER TABLE ONLY changesets_subscribers + ADD CONSTRAINT changesets_subscribers_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id); + + + -- + -- Name: changesets_subscribers_subscriber_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - + -- + + ALTER TABLE ONLY changesets_subscribers + ADD CONSTRAINT changesets_subscribers_subscriber_id_fkey FOREIGN KEY (subscriber_id) REFERENCES users(id); + + -- -- Name: changesets_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@@ -2426,6 -2544,10 +2537,10 @@@ INSERT INTO schema_migrations (version INSERT INTO schema_migrations (version) VALUES ('20140210003018'); + INSERT INTO schema_migrations (version) VALUES ('20140507110937'); + + INSERT INTO schema_migrations (version) VALUES ('20140519141742'); + INSERT INTO schema_migrations (version) VALUES ('21'); INSERT INTO schema_migrations (version) VALUES ('22'); @@@ -2513,3 -2635,3 +2628,4 @@@ INSERT INTO schema_migrations (version INSERT INTO schema_migrations (version) VALUES ('8'); INSERT INTO schema_migrations (version) VALUES ('9'); ++