]> git.openstreetmap.org Git - rails.git/commitdiff
Merge branch 'master' into overpass
authorTom Hughes <tom@compton.nu>
Sat, 1 Nov 2014 12:46:42 +0000 (12:46 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 1 Nov 2014 12:50:23 +0000 (12:50 +0000)
1  2 
app/assets/javascripts/index.js
app/assets/stylesheets/common.css.scss
config/example.application.yml
config/locales/en.yml
config/routes.rb
db/structure.sql

index 236ed44fc190de0410a0145fb0cfddd6d1b6ad13,0cf08f84539f50321dcff5caa35f368a2fbcda8e..191f390bf4941363049d61981db189ea0f17313b
@@@ -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);
  
      $.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();
    }
      "/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") {
      if (query) {
        OSM.router.route("/search?query=" + encodeURIComponent(query) + OSM.formatHash(map));
      } else {
-       OSM.router.route("/" + OSM.formatHash(map));
+       OSM.router.route("/");
      }
    });
  
index d3268f43b511ffad0c35706971fce2d8ea2cdc0a,37a6aa7a95bae2c6d81c0f40af663ff402694740..ef2d9c00dd239e999a6a5f2bbc245ce991b5c148
@@@ -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 */
    #map {
      height: 100%;
      overflow: hidden;
 +
 +    &.query-active {
 +      cursor: help;
 +    }
 +
 +    &.query-disabled {
 +      cursor: not-allowed;
 +    }
    }
  
    #map-ui {
  
  .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 {
      font-size: 90%;
    }
  
-   .note-comments li {
+   .note-comments li, .changeset-comments li {
      margin: $lineheight/2 0;
  
      p {
      }
    }
  
+   .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 */
    }
  }
  
+ /* 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;
    background: $blue;
    text-align: center;
    border-radius: 2px;
-   -moz-border-radius: 2px;
    &:hover {
      background: darken($blue, $hovercolor);
      text-decoration: none;
    }
  }
  
+ input[type="button"],
+ input[type="submit"],
+ input[type="reset"] {
+   line-height: normal;
+ }
+ a.button {
+   line-height: 20px;
+ }
  .buttons {
    min-width: 200px;
    input[type="submit"],
  
  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) {
  
    .richtext_content {
      width: 50%;
-     width: -moz-calc(100% - 235px);
-     width: -webkit-calc(100% - 235px);
      width: calc(100% - 235px);
      display: inline-block;
      vertical-align: top;
    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 {
    }
  }
  
+ #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) {
index 7f6aaf298e5165b795a178a5fd5c405a0c05a01e,3fbebdc766c5d82424682433381aeeb5246463ca..e7915c96b7699924de9f98a1a06e8479a0575c07
@@@ -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 eb2991d4e1c96792c71b5060dadb493a514e9fc4,021151052ed5c13806fe4c3bfb185687e3134000..69e52e44dfd685b685cf8a9102838c0bf9af3eb3
@@@ -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} <abbr title='%{exact_time}'>%{when} ago</abbr>"
+       commented_by: "Comment from %{user} <abbr title='%{exact_time}'>%{when} ago</abbr>"
        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}"
        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:
        reopened_by: "Reactivated by %{user} <abbr title='%{exact_time}'>%{when} ago</abbr>"
        reopened_by_anonymous: "Reactivated by anonymous <abbr title='%{exact_time}'>%{when} ago</abbr>"
        hidden_by: "Hidden by %{user} <abbr title='%{exact_time}'>%{when} ago</abbr>"
 +    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}"
        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
            primary_link: "Primary Road"
            proposed: "Proposed Road"
            raceway: "Raceway"
 -          residential: "Residential"
 +          residential: "Residential Road"
            rest_area: "Rest Area"
            road: "Road"
            secondary: "Secondary Road"
            tram: "Tramway"
            tram_stop: "Tram Stop"
            yard: "Railway Yard"
 +        route:
 +          bus: "Bus Route"
          shop:
            alcohol: "Off License"
            antiques: "Antiques"
        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
          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"
          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
        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.)"
          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 9af0c1099118c67f0f2f2918b8c5777c03cba291,8cbf8f900c06f2305a5067c3ea6524914fff1388..7084d1c8dac071a8ab8f4ec4546a5b3ac2280491
@@@ -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+/
    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
    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 1d6170bc416e62ca968b60f8f4d4204a5785e489,c287baea38197e16737ff0143af5866b58d14a0a..343aec084abbc9b1ac43026e1839ca5c41c5647b
@@@ -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';
  
  
  --
  
  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';
  
  
  --
  --
  
  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');
++