From c3ad6aa2923c03aeeea0b57033b0a9238d262aa2 Mon Sep 17 00:00:00 2001 From: Matt Amos Date: Mon, 22 Aug 2016 18:38:03 +0100 Subject: [PATCH] More whitespace fixes. Attempting to get tests to pass. --- app/controllers/issues_controller.rb | 14 +- app/views/browse/note.html.erb | 2 +- app/views/diary_entry/_diary_comment.html.erb | 6 +- app/views/issues/_comments.html.erb | 49 +-- app/views/issues/_reports.html.erb | 28 +- app/views/issues/index.html.erb | 66 ++-- app/views/issues/new.html.erb | 61 ++-- app/views/issues/show.html.erb | 106 +++--- config/locales/en-GB.yml | 52 +-- config/locales/en.yml | 54 ++-- db/structure.sql | 302 +++++++++--------- test/controllers/issues_controller_test.rb | 34 +- test/fixtures/issues.yml | 38 +-- 13 files changed, 422 insertions(+), 390 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index d31326a7d..763c85ef1 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -69,7 +69,6 @@ class IssuesController < ApplicationController @issue = Issue.find_or_initialize_by(create_new_issue_params) path = "issues.report_strings." + @issue.reportable.class.name.to_s @report_strings_yaml = t(path) - flash[:referer] = params[:referer] end end @@ -106,7 +105,7 @@ class IssuesController < ApplicationController Notifier.new_issue_notification(@issue.id, User.find(user.user_id)).deliver_now end - redirect_to flash[:referer], :notice => t("issues.create.successful_report") + redirect_back "/", :notice => t("issues.create.successful_report") end else redirect_to new_issue_path(:reportable_type => @issue.reportable_type, :reportable_id => @issue.reportable_id, :reported_user_id => @issue.reported_user_id), :notice => t("issues.create.provide_details") @@ -140,7 +139,7 @@ class IssuesController < ApplicationController if @report.save! @issue.report_count = @issue.reports.count @issue.save! - redirect_to flash[:referer], :notice => notice + redirect_back "/", :notice => notice end else redirect_to new_issue_path(:reportable_type => @issue.reportable_type, :reportable_id => @issue.reportable_id, :reported_user_id => @issue.reported_user_id), :notice => t("issues.update.provide_details") @@ -272,4 +271,13 @@ class IssuesController < ApplicationController def sort_direction %w(asc desc).include?(params[:direction]) ? params[:direction] : "asc" end + + # back-port of ActionController#redirect_back from rails 5 + def redirect_back(fallback_location, **args) + if referer = request.headers["Referer"] + redirect_to referer, **args + else + redirect_to fallback_location, **args + end + end end diff --git a/app/views/browse/note.html.erb b/app/views/browse/note.html.erb index 3c66482b3..a3b5f0c54 100644 --- a/app/views/browse/note.html.erb +++ b/app/views/browse/note.html.erb @@ -3,7 +3,7 @@

<%= t "browse.note.#{@note.status}_title", :note_name => @note.id %> - <% if @user and @user.id!=@note.author.id %> + <% if @user && @note.author && @user.id != @note.author.id %> <%= link_to new_issue_url(reportable_id: @note.id, reportable_type: @note.class.name, reported_user_id: @note.author.id,referer: request.fullpath), :title => t('browse.note.report') do %>  ⚐ <% end %> diff --git a/app/views/diary_entry/_diary_comment.html.erb b/app/views/diary_entry/_diary_comment.html.erb index f5685b0cd..e3375fd8b 100644 --- a/app/views/diary_entry/_diary_comment.html.erb +++ b/app/views/diary_entry/_diary_comment.html.erb @@ -2,12 +2,12 @@ <%= user_thumbnail diary_comment.user %>

<%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}"))) %> <% if @user and diary_comment.user.id != @user.id %> - <%= link_to new_issue_url(reportable_id: diary_comment.id, reportable_type: diary_comment.class.name, reported_user_id: diary_comment.user.id, referer: request.fullpath), :title => t('diary_entry.diary_comment.report') do %> + <%= link_to new_issue_url(reportable_id: diary_comment.id, reportable_type: diary_comment.class.name, reported_user_id: diary_comment.user.id, referer: request.fullpath), :title => t('diary_entry.diary_comment.report') do %>  ⚐ - <% end %> + <% end %> <% end %>

- +
<%= diary_comment.body.to_html %>
<%= if_administrator(:span) do %> <%= link_to t('diary_entry.diary_comment.hide_link'), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data=> { :confirm => t('diary_entry.diary_comment.confirm') } %> diff --git a/app/views/issues/_comments.html.erb b/app/views/issues/_comments.html.erb index 0992388d0..ee40c9d5a 100644 --- a/app/views/issues/_comments.html.erb +++ b/app/views/issues/_comments.html.erb @@ -1,29 +1,30 @@
-<% comments.each do |comment| %> -
-
- <%= link_to user_thumbnail(comment.user), :controller => :user,:action =>:view, :display_name => comment.user.display_name %> -
- <%= link_to comment.user.display_name, :controller => :user,:action =>:view, :display_name => comment.user.display_name %>
- <%= comment.body %> + <% comments.each do |comment| %> +
+
+ <%= link_to user_thumbnail(comment.user), :controller => :user,:action =>:view, :display_name => comment.user.display_name %> +
+ <%= link_to comment.user.display_name, :controller => :user,:action =>:view, :display_name => comment.user.display_name %>
+ <%= comment.body %> - <% if comment.reassign %> -
- <%= t('issues.show.comments.reassign') %> - <% end %> -
- - On <%= l comment.created_at.to_datetime, :format => :friendly %> -
-<% end %> + <% if comment.reassign %> +
+ <%= t('issues.show.comments.reassign') %> + <% end %> +
+ + On <%= l comment.created_at.to_datetime, :format => :friendly %> + +
+ <% end %>

- <%= form_for :issue_comment, :url => { :action => 'comment', :id => @issue.id, :user_id => @user.id } do |f| %> - <%= richtext_area :issue_comment, :body, :cols => 10, :rows => 8, :required => true %> - <%= label_tag t('issues.show.comments.reassign_param') %> <%= check_box_tag :reassign, true %> -
-
- <%= submit_tag 'Submit' %> - <% end %> -
\ No newline at end of file + <%= form_for :issue_comment, :url => { :action => 'comment', :id => @issue.id, :user_id => @user.id } do |f| %> + <%= richtext_area :issue_comment, :body, :cols => 10, :rows => 8, :required => true %> + <%= label_tag t('issues.show.comments.reassign_param') %> <%= check_box_tag :reassign, true %> +
+
+ <%= submit_tag 'Submit' %> + <% end %> + diff --git a/app/views/issues/_reports.html.erb b/app/views/issues/_reports.html.erb index 3d31eeb1a..97d1ec793 100644 --- a/app/views/issues/_reports.html.erb +++ b/app/views/issues/_reports.html.erb @@ -1,16 +1,16 @@ <% reports.each do |report| %> - <% details = report.details.split("--||--") %> -
-
- <%= link_to user_thumbnail(report.user), :controller => :user,:action =>:view, :display_name => report.user.display_name %> -
- Reported as <%= details[1].delete('[').delete(']').downcase %> by <%= link_to report.user.display_name, :controller => :user,:action =>:view, :display_name => report.user.display_name %>
- - On <%= l report.updated_at.to_datetime, :format => :friendly %> - -
- <%= details[0] %> -
-
-
+ <% details = report.details.split("--||--") %> +
+
+ <%= link_to user_thumbnail(report.user), :controller => :user,:action =>:view, :display_name => report.user.display_name %> +
+ Reported as <%= details[1].delete('[').delete(']').downcase %> by <%= link_to report.user.display_name, :controller => :user,:action =>:view, :display_name => report.user.display_name %>
+ + On <%= l report.updated_at.to_datetime, :format => :friendly %> + +
+ <%= details[0] %> +
+
+
<% end %> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 340f5ab9b..7a7da4578 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -1,47 +1,43 @@

<%= notice %>

<% content_for :heading do %> -

List of <%= @user_role %> issues:

+

List of <%= @user_role %> issues:

<% end %> <%= form_tag(issues_path, :method => :get) do %> - Search for a particular issue(s):
- <%= select :status, nil, [['open', 0],['resolved',2],['ignored',1]],{:include_blank => "Select status"},data: { behavior: 'category_dropdown' } %> - <%= select :issue_type, nil, @issue_types,{:include_blank => "Select type"}, data: { behavior: 'category_dropdown' } %> - <%= text_field_tag :search_by_user, params[:search_by_user], placeholder: "Reported User" %> - <%= select :last_reported_by, nil, @users.all.collect {|f| [f.display_name, f.id]} << ['Not updated',"nil"], {:include_blank => "Select last updated by"}, data: { behavior: 'category_dropdown' } %> - <%= submit_tag "Search" %> +Search for a particular issue(s):
+<%= select :status, nil, [['open', 0],['resolved',2],['ignored',1]],{:include_blank => "Select status"},data: { behavior: 'category_dropdown' } %> +<%= select :issue_type, nil, @issue_types,{:include_blank => "Select type"}, data: { behavior: 'category_dropdown' } %> +<%= text_field_tag :search_by_user, params[:search_by_user], placeholder: "Reported User" %> +<%= select :last_reported_by, nil, @users.all.collect {|f| [f.display_name, f.id]} << ['Not updated',"nil"], {:include_blank => "Select last updated by"}, data: { behavior: 'category_dropdown' } %> +<%= submit_tag "Search" %> <% end %>

- - - - - - - - - - - - - - - <% @issues.each do |issue| %> - - - - - - - - - - <% end %> - + + + + + + + + + + + + + <% @issues.each do |issue| %> + + + + + + + + + + <% end %> +
<%= sortable("status") %> <%= sortable("report_count", "Number of Reports") %> <%= sortable("updated_at","Last updated at") %> <%= sortable("updated_by","Last updated by") %> Link to reports <%= sortable("reported_user_id","Reported User") %> Link to reported instance
<%= issue.status.humanize %><%= issue.report_count %><%= l(issue.updated_at.to_datetime, :format => :friendly) %><% if issue.user_updated %> <%= issue.user_updated.display_name %> <% else %> - <% end %> <%= reports_url(issue) %><%= link_to issue.user.display_name , :controller => :user, :action => :view,:display_name => issue.user.display_name %><%= instance_url(issue.reportable) %>
<%= sortable("status") %> <%= sortable("report_count", "Number of Reports") %> <%= sortable("updated_at","Last updated at") %> <%= sortable("updated_by","Last updated by") %> Link to reports <%= sortable("reported_user_id","Reported User") %> Link to reported instance
<%= issue.status.humanize %><%= issue.report_count %><%= l(issue.updated_at.to_datetime, :format => :friendly) %><% if issue.user_updated %> <%= issue.user_updated.display_name %> <% else %> - <% end %><%= reports_url(issue) %><%= link_to issue.user.display_name , :controller => :user, :action => :view,:display_name => issue.user.display_name %><%= instance_url(issue.reportable) %>
- - diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb index 010394c29..dc2ee044e 100644 --- a/app/views/issues/new.html.erb +++ b/app/views/issues/new.html.erb @@ -1,44 +1,43 @@ <% content_for :heading do %> -

Report <%= reportable_url(@issue.reportable) %>

+

Report <%= reportable_url(@issue.reportable) %>

<% end %>
-
<%= form_for(@issue) do |f| %> - <%= f.error_messages %> -
-
- <%= f.hidden_field :reportable_id %> - <%= f.hidden_field :reportable_type %> - <%= f.hidden_field :reported_user_id %> -
+ <%= f.error_messages %> +
+
+ <%= f.hidden_field :reportable_id %> + <%= f.hidden_field :reportable_type %> + <%= f.hidden_field :reported_user_id %> +
-
-

<%= t('issues.new.select') %>:

+
+

<%= t('issues.new.select') %>:

-
- <% @report_strings_yaml.each do |k,v| %> -
- <%= radio_button_tag :report_type, v[:type].to_s %> - <%= label_tag v[:details].to_s %>
-
- <% end %> -
- -
- <%= text_area :report, :details, :cols => 20, :rows => 3, placeholder: t('issues.new.details'), required: true %> -
+
+ <% @report_strings_yaml.each do |k,v| %> +
+ <%= radio_button_tag :report_type, v[:type].to_s %> + <%= label_tag v[:details].to_s %>
+
+ <% end %> +
-
- <%= submit_tag %> -
- -
+
+ <%= text_area :report, :details, :cols => 20, :rows => 3, placeholder: t('issues.new.details'), required: true %> + + +
+ <%= submit_tag %> +
+
<% end %> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 4611324f3..e97479b90 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -1,62 +1,60 @@ <% content_for :heading do %> -

<%= @issue.status.humanize %> Issue #<%= @issue.id %>

-

<%= report_type(@issue.reportable_type) %> : <%= reportable_url(@issue.reportable) %>

-

- - <%= @issue.reports.count %> reports | First reported: <%= l @issue.created_at.to_datetime, :format => :friendly %> <%= "| Last resolved at #{l(@issue.resolved_at.to_datetime, :format =>:friendly)}" if @issue.resolved_at? %> <%= "| Last updated at #{l(@issue.updated_at.to_datetime, :format => :friendly)} by #{@updated_by_admin.display_name}" if @updated_by_admin %> - -

-

- <%= link_to t('issues.resolve'), resolve_issue_url(@issue), :method => :post if @issue.may_resolve? %> - <% if @issue.may_ignore? %> - | <%= link_to t('issues.ignore'), ignore_issue_url(@issue), :method => :post %> - <% end %> -

-

<%= link_to t('issues.reopen'), reopen_issue_url(@issue), :method => :post if @issue.may_reopen? %>

+

<%= @issue.status.humanize %> Issue #<%= @issue.id %>

+

<%= report_type(@issue.reportable_type) %> : <%= reportable_url(@issue.reportable) %>

+

+ + <%= @issue.reports.count %> reports | First reported: <%= l @issue.created_at.to_datetime, :format => :friendly %> <%= "| Last resolved at #{l(@issue.resolved_at.to_datetime, :format =>:friendly)}" if @issue.resolved_at? %> <%= "| Last updated at #{l(@issue.updated_at.to_datetime, :format => :friendly)} by #{@updated_by_admin.display_name}" if @updated_by_admin %> + +

+

+ <%= link_to t('issues.resolve'), resolve_issue_url(@issue), :method => :post if @issue.may_resolve? %> + <% if @issue.may_ignore? %> + | <%= link_to t('issues.ignore'), ignore_issue_url(@issue), :method => :post %> + <% end %> +

+

<%= link_to t('issues.reopen'), reopen_issue_url(@issue), :method => :post if @issue.may_reopen? %>

<% end %>

Comments on this issue:

-
- <%= render 'comments', comments: @comments %> -
- +
+ <%= render 'comments', comments: @comments %> +
diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index edac3808b..ea13cf0f8 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -319,7 +319,7 @@ en-GB: edit_link: Edit this entry hide_link: Hide this entry confirm: Confirm - report: Report this entry? + report: Report this entry? diary_comment: comment_from: Comment from %{link_user} on %{comment_created_at} hide_link: Hide this comment @@ -944,7 +944,7 @@ en-GB: resolve: Resolve ignore: Ignore reopen: Reopen - index: + index: search: user_not_found: User does not exist issues_not_found: No such issues found @@ -968,89 +968,89 @@ en-GB: reassign: The Issue was reassigned reassign_param: Reassign Issue? comment: - provide_details: Please provide the required details + provide_details: Please provide the required details comment_created: Your comment was successfully created resolved: Issue status has been set to 'Resolved' ignored: Issue status has been set to 'Ignored' reopened: Issue status has been set to 'Open' report_strings: DiaryEntry: - spam: + spam: type: "[SPAM]" details: This Diary Entry is/contains spam - offensive: + offensive: type: "[OFFENSIVE]" details: This Diary Entry is obscene/offensive - threat: + threat: type: "[THREAT]" details: This Diary Entry contains a threat - other: + other: type: "[OTHER]" details: Other DiaryComment: - spam: + spam: type: "[SPAM]" details: This Diary Comment is/contains spam - offensive: + offensive: type: "[OFFENSIVE]" details: This Diary Comment is obscene/offensive - threat: + threat: type: "[THREAT]" details: This Diary Comment contains a threat - other: + other: type: "[OTHER]" details: Other User: - spam: + spam: type: "[SPAM]" details: This User profile is/contains spam - offensive: + offensive: type: "[OFFENSIVE]" details: This User profile is obscene/offensive - threat: + threat: type: "[THREAT]" details: This User profile contains a threat vandal: type: "[VANDAL]" details: This User is a vandal - other: + other: type: "[OTHER]" - details: Other + details: Other Changeset: undiscussed_import: type: "[UNDISCUSSED-IMPORT]" - details: This changeset is an undiscussed import + details: This changeset is an undiscussed import mechanical_edit: type: "[MECH-EDIT]" - details: This changeset is a mechanical edit + details: This changeset is a mechanical edit edit_error: type: "[EDIT-ERROR]" - details: This changeset contains a newbie or an editor error + details: This changeset contains a newbie or an editor error spam: type: "[SPAM]" - details: This changeset is/contains spam + details: This changeset is/contains spam vandalism: type: "[VANDALISM]" - details: This changeset is/contains vandalism - other: + details: This changeset is/contains vandalism + other: type: "[OTHER]" details: Other Note: spam: type: "[SPAM]" - details: This note is spam + details: This note is spam vandalism: type: "[VANDALISM]" - details: This note is vandalism + details: This note is vandalism personal: type: "[PERSONAL]" - details: This note contains personal data + details: This note contains personal data abusive: type: "[ABUSIVE]" details: This note is abusive other: type: "[OTHER]" - details: Other + details: Other layouts: project_name: title: OpenStreetMap diff --git a/config/locales/en.yml b/config/locales/en.yml index 5e7f25277..dc59506e8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -917,7 +917,7 @@ en: index: search: user_not_found: User does not exist - issues_not_found: No such issues found + issues_not_found: No such issues found create: successful_report: Your report has been registered sucessfully provide_details: Please provide the required details @@ -933,94 +933,94 @@ en: not_just_mistake: You are sure that the problem is not just a mistake unable_to_fix: You are unable to fix the problem yourself resolve_with_user: You have tried to resolve the problem with the user - show: + show: comments: reassign: The Issue was reassigned reassign_param: Reassign Issue? comment: - provide_details: Please provide the required details - comment_created: Your comment was successfully created + provide_details: Please provide the required details + comment_created: Your comment was successfully created resolved: Issue status has been set to 'Resolved' ignored: Issue status has been set to 'Ignored' reopened: Issue status has been set to 'Open' report_strings: DiaryEntry: - spam: + spam: type: "[SPAM]" details: This Diary Entry is/contains spam - offensive: + offensive: type: "[OFFENSIVE]" details: This Diary Entry is obscene/offensive - threat: + threat: type: "[THREAT]" details: This Diary Entry contains a threat - other: + other: type: "[OTHER]" details: Other DiaryComment: - spam: + spam: type: "[SPAM]" details: This Diary Comment is/contains spam - offensive: + offensive: type: "[OFFENSIVE]" details: This Diary Comment is obscene/offensive - threat: + threat: type: "[THREAT]" details: This Diary Comment contains a threat - other: + other: type: "[OTHER]" details: Other User: - spam: + spam: type: "[SPAM]" details: This User profile is/contains spam - offensive: + offensive: type: "[OFFENSIVE]" details: This User profile is obscene/offensive - threat: + threat: type: "[THREAT]" details: This User profile contains a threat vandal: type: "[VANDAL]" details: This User is a vandal - other: + other: type: "[OTHER]" - details: Other + details: Other Changeset: undiscussed_import: type: "[UNDISCUSSED-IMPORT]" - details: This changeset is an undiscussed import + details: This changeset is an undiscussed import mechanical_edit: type: "[MECH-EDIT]" - details: This changeset is a mechanical edit + details: This changeset is a mechanical edit edit_error: type: "[EDIT-ERROR]" - details: This changeset contains a newbie or an editor error + details: This changeset contains a newbie or an editor error spam: type: "[SPAM]" - details: This changeset is/contains spam + details: This changeset is/contains spam vandalism: type: "[VANDALISM]" - details: This changeset is/contains vandalism - other: + details: This changeset is/contains vandalism + other: type: "[OTHER]" details: Other Note: spam: type: "[SPAM]" - details: This note is spam + details: This note is spam vandalism: type: "[VANDALISM]" - details: This note is vandalism + details: This note is vandalism personal: type: "[PERSONAL]" - details: This note contains personal data + details: This note contains personal data abusive: type: "[ABUSIVE]" details: This note is abusive other: type: "[OTHER]" - details: Other + details: Other layouts: project_name: # in diff --git a/db/structure.sql b/db/structure.sql index 8c43c1764..6abd8c753 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -111,7 +111,7 @@ SET default_tablespace = ''; SET default_with_oids = false; -- --- Name: acls; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: acls; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE acls ( @@ -143,7 +143,7 @@ ALTER SEQUENCE acls_id_seq OWNED BY acls.id; -- --- Name: changeset_comments; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: changeset_comments; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE changeset_comments ( @@ -176,7 +176,7 @@ ALTER SEQUENCE changeset_comments_id_seq OWNED BY changeset_comments.id; -- --- Name: changeset_tags; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: changeset_tags; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE changeset_tags ( @@ -187,7 +187,7 @@ CREATE TABLE changeset_tags ( -- --- Name: changesets; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: changesets; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE changesets ( @@ -223,7 +223,7 @@ ALTER SEQUENCE changesets_id_seq OWNED BY changesets.id; -- --- Name: changesets_subscribers; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: changesets_subscribers; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE changesets_subscribers ( @@ -233,7 +233,7 @@ CREATE TABLE changesets_subscribers ( -- --- Name: client_applications; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: client_applications; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE client_applications ( @@ -277,7 +277,7 @@ ALTER SEQUENCE client_applications_id_seq OWNED BY client_applications.id; -- --- Name: current_node_tags; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: current_node_tags; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE current_node_tags ( @@ -288,7 +288,7 @@ CREATE TABLE current_node_tags ( -- --- Name: current_nodes; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: current_nodes; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE current_nodes ( @@ -323,7 +323,7 @@ ALTER SEQUENCE current_nodes_id_seq OWNED BY current_nodes.id; -- --- Name: current_relation_members; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: current_relation_members; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE current_relation_members ( @@ -336,7 +336,7 @@ CREATE TABLE current_relation_members ( -- --- Name: current_relation_tags; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: current_relation_tags; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE current_relation_tags ( @@ -347,7 +347,7 @@ CREATE TABLE current_relation_tags ( -- --- Name: current_relations; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: current_relations; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE current_relations ( @@ -379,7 +379,7 @@ ALTER SEQUENCE current_relations_id_seq OWNED BY current_relations.id; -- --- Name: current_way_nodes; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: current_way_nodes; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE current_way_nodes ( @@ -390,7 +390,7 @@ CREATE TABLE current_way_nodes ( -- --- Name: current_way_tags; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: current_way_tags; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE current_way_tags ( @@ -401,7 +401,7 @@ CREATE TABLE current_way_tags ( -- --- Name: current_ways; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: current_ways; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE current_ways ( @@ -433,7 +433,7 @@ ALTER SEQUENCE current_ways_id_seq OWNED BY current_ways.id; -- --- Name: diary_comments; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: diary_comments; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE diary_comments ( @@ -468,7 +468,7 @@ ALTER SEQUENCE diary_comments_id_seq OWNED BY diary_comments.id; -- --- Name: diary_entries; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: diary_entries; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE diary_entries ( @@ -506,7 +506,7 @@ ALTER SEQUENCE diary_entries_id_seq OWNED BY diary_entries.id; -- --- Name: friends; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: friends; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE friends ( @@ -536,7 +536,7 @@ ALTER SEQUENCE friends_id_seq OWNED BY friends.id; -- --- Name: gps_points; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: gps_points; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE gps_points ( @@ -551,7 +551,7 @@ CREATE TABLE gps_points ( -- --- Name: gpx_file_tags; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: gpx_file_tags; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE gpx_file_tags ( @@ -581,7 +581,7 @@ ALTER SEQUENCE gpx_file_tags_id_seq OWNED BY gpx_file_tags.id; -- --- Name: gpx_files; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: gpx_files; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE gpx_files ( @@ -619,7 +619,7 @@ ALTER SEQUENCE gpx_files_id_seq OWNED BY gpx_files.id; -- --- Name: issue_comments; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: issue_comments; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE issue_comments ( @@ -653,7 +653,7 @@ ALTER SEQUENCE issue_comments_id_seq OWNED BY issue_comments.id; -- --- Name: issues; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: issues; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE issues ( @@ -692,7 +692,7 @@ ALTER SEQUENCE issues_id_seq OWNED BY issues.id; -- --- Name: languages; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: languages; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE languages ( @@ -703,7 +703,7 @@ CREATE TABLE languages ( -- --- Name: messages; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: messages; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE messages ( @@ -740,7 +740,7 @@ ALTER SEQUENCE messages_id_seq OWNED BY messages.id; -- --- Name: node_tags; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: node_tags; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE node_tags ( @@ -752,7 +752,7 @@ CREATE TABLE node_tags ( -- --- Name: nodes; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: nodes; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE nodes ( @@ -769,7 +769,7 @@ CREATE TABLE nodes ( -- --- Name: note_comments; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: note_comments; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE note_comments ( @@ -804,7 +804,7 @@ ALTER SEQUENCE note_comments_id_seq OWNED BY note_comments.id; -- --- Name: notes; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: notes; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE notes ( @@ -839,7 +839,7 @@ ALTER SEQUENCE notes_id_seq OWNED BY notes.id; -- --- Name: oauth_nonces; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: oauth_nonces; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE oauth_nonces ( @@ -871,7 +871,7 @@ ALTER SEQUENCE oauth_nonces_id_seq OWNED BY oauth_nonces.id; -- --- Name: oauth_tokens; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: oauth_tokens; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE oauth_tokens ( @@ -919,7 +919,7 @@ ALTER SEQUENCE oauth_tokens_id_seq OWNED BY oauth_tokens.id; -- --- Name: redactions; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: redactions; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE redactions ( @@ -953,7 +953,7 @@ ALTER SEQUENCE redactions_id_seq OWNED BY redactions.id; -- --- Name: relation_members; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: relation_members; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE relation_members ( @@ -967,7 +967,7 @@ CREATE TABLE relation_members ( -- --- Name: relation_tags; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: relation_tags; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE relation_tags ( @@ -979,7 +979,7 @@ CREATE TABLE relation_tags ( -- --- Name: relations; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: relations; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE relations ( @@ -993,7 +993,7 @@ CREATE TABLE relations ( -- --- Name: reports; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: reports; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE reports ( @@ -1026,7 +1026,7 @@ ALTER SEQUENCE reports_id_seq OWNED BY reports.id; -- --- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE schema_migrations ( @@ -1035,7 +1035,7 @@ CREATE TABLE schema_migrations ( -- --- Name: user_blocks; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: user_blocks; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE user_blocks ( @@ -1072,7 +1072,7 @@ ALTER SEQUENCE user_blocks_id_seq OWNED BY user_blocks.id; -- --- Name: user_preferences; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: user_preferences; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE user_preferences ( @@ -1083,7 +1083,7 @@ CREATE TABLE user_preferences ( -- --- Name: user_roles; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: user_roles; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE user_roles ( @@ -1116,7 +1116,7 @@ ALTER SEQUENCE user_roles_id_seq OWNED BY user_roles.id; -- --- Name: user_tokens; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: user_tokens; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE user_tokens ( @@ -1148,7 +1148,7 @@ ALTER SEQUENCE user_tokens_id_seq OWNED BY user_tokens.id; -- --- Name: users; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: users; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE users ( @@ -1206,7 +1206,7 @@ ALTER SEQUENCE users_id_seq OWNED BY users.id; -- --- Name: way_nodes; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: way_nodes; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE way_nodes ( @@ -1218,7 +1218,7 @@ CREATE TABLE way_nodes ( -- --- Name: way_tags; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: way_tags; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE way_tags ( @@ -1230,7 +1230,7 @@ CREATE TABLE way_tags ( -- --- Name: ways; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- Name: ways; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE ways ( @@ -1419,7 +1419,7 @@ ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regcl -- --- Name: acls_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: acls_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY acls @@ -1427,7 +1427,7 @@ ALTER TABLE ONLY acls -- --- Name: changeset_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: changeset_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY changeset_comments @@ -1435,7 +1435,7 @@ ALTER TABLE ONLY changeset_comments -- --- Name: changesets_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: changesets_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY changesets @@ -1443,7 +1443,7 @@ ALTER TABLE ONLY changesets -- --- Name: client_applications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: client_applications_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY client_applications @@ -1451,7 +1451,7 @@ ALTER TABLE ONLY client_applications -- --- Name: current_node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: current_node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY current_node_tags @@ -1459,7 +1459,7 @@ ALTER TABLE ONLY current_node_tags -- --- Name: current_nodes_pkey1; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: current_nodes_pkey1; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY current_nodes @@ -1467,7 +1467,7 @@ ALTER TABLE ONLY current_nodes -- --- Name: current_relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: current_relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY current_relation_members @@ -1475,7 +1475,7 @@ ALTER TABLE ONLY current_relation_members -- --- Name: current_relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: current_relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY current_relation_tags @@ -1483,7 +1483,7 @@ ALTER TABLE ONLY current_relation_tags -- --- Name: current_relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: current_relations_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY current_relations @@ -1491,7 +1491,7 @@ ALTER TABLE ONLY current_relations -- --- Name: current_way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: current_way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY current_way_nodes @@ -1499,7 +1499,7 @@ ALTER TABLE ONLY current_way_nodes -- --- Name: current_way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: current_way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY current_way_tags @@ -1507,7 +1507,7 @@ ALTER TABLE ONLY current_way_tags -- --- Name: current_ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: current_ways_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY current_ways @@ -1515,7 +1515,7 @@ ALTER TABLE ONLY current_ways -- --- Name: diary_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: diary_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY diary_comments @@ -1523,7 +1523,7 @@ ALTER TABLE ONLY diary_comments -- --- Name: diary_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: diary_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY diary_entries @@ -1531,7 +1531,7 @@ ALTER TABLE ONLY diary_entries -- --- Name: friends_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: friends_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY friends @@ -1539,7 +1539,7 @@ ALTER TABLE ONLY friends -- --- Name: gpx_file_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: gpx_file_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY gpx_file_tags @@ -1547,7 +1547,7 @@ ALTER TABLE ONLY gpx_file_tags -- --- Name: gpx_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: gpx_files_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY gpx_files @@ -1555,7 +1555,7 @@ ALTER TABLE ONLY gpx_files -- --- Name: issue_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: issue_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY issue_comments @@ -1563,7 +1563,7 @@ ALTER TABLE ONLY issue_comments -- --- Name: issues_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: issues_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY issues @@ -1571,7 +1571,7 @@ ALTER TABLE ONLY issues -- --- Name: languages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: languages_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY languages @@ -1579,7 +1579,7 @@ ALTER TABLE ONLY languages -- --- Name: messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: messages_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY messages @@ -1587,7 +1587,7 @@ ALTER TABLE ONLY messages -- --- Name: node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY node_tags @@ -1595,7 +1595,7 @@ ALTER TABLE ONLY node_tags -- --- Name: nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY nodes @@ -1603,7 +1603,7 @@ ALTER TABLE ONLY nodes -- --- Name: note_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: note_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY note_comments @@ -1611,7 +1611,7 @@ ALTER TABLE ONLY note_comments -- --- Name: notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: notes_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY notes @@ -1619,7 +1619,7 @@ ALTER TABLE ONLY notes -- --- Name: oauth_nonces_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: oauth_nonces_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY oauth_nonces @@ -1627,7 +1627,7 @@ ALTER TABLE ONLY oauth_nonces -- --- Name: oauth_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: oauth_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY oauth_tokens @@ -1635,7 +1635,7 @@ ALTER TABLE ONLY oauth_tokens -- --- Name: redactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: redactions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY redactions @@ -1643,7 +1643,7 @@ ALTER TABLE ONLY redactions -- --- Name: relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY relation_members @@ -1651,7 +1651,7 @@ ALTER TABLE ONLY relation_members -- --- Name: relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY relation_tags @@ -1659,7 +1659,7 @@ ALTER TABLE ONLY relation_tags -- --- Name: relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: relations_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY relations @@ -1667,7 +1667,7 @@ ALTER TABLE ONLY relations -- --- Name: reports_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: reports_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY reports @@ -1675,7 +1675,7 @@ ALTER TABLE ONLY reports -- --- Name: user_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: user_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_blocks @@ -1683,7 +1683,7 @@ ALTER TABLE ONLY user_blocks -- --- Name: user_preferences_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: user_preferences_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_preferences @@ -1691,7 +1691,7 @@ ALTER TABLE ONLY user_preferences -- --- Name: user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_roles @@ -1699,7 +1699,7 @@ ALTER TABLE ONLY user_roles -- --- Name: user_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: user_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_tokens @@ -1707,7 +1707,7 @@ ALTER TABLE ONLY user_tokens -- --- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY users @@ -1715,7 +1715,7 @@ ALTER TABLE ONLY users -- --- Name: way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY way_nodes @@ -1723,7 +1723,7 @@ ALTER TABLE ONLY way_nodes -- --- Name: way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY way_tags @@ -1731,7 +1731,7 @@ ALTER TABLE ONLY way_tags -- --- Name: ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- Name: ways_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY ways @@ -1739,469 +1739,469 @@ ALTER TABLE ONLY ways -- --- Name: acls_k_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: acls_k_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX acls_k_idx ON acls USING btree (k); -- --- Name: changeset_tags_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: changeset_tags_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX changeset_tags_id_idx ON changeset_tags USING btree (changeset_id); -- --- Name: changesets_bbox_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: changesets_bbox_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX changesets_bbox_idx ON changesets USING btree (min_lat, max_lat, min_lon, max_lon); -- --- Name: changesets_closed_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: changesets_closed_at_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX changesets_closed_at_idx ON changesets USING btree (closed_at); -- --- Name: changesets_created_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: changesets_created_at_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX changesets_created_at_idx ON changesets USING btree (created_at); -- --- Name: changesets_user_id_created_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: changesets_user_id_created_at_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX changesets_user_id_created_at_idx ON changesets USING btree (user_id, created_at); -- --- Name: changesets_user_id_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: changesets_user_id_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX changesets_user_id_id_idx ON changesets USING btree (user_id, id); -- --- Name: current_nodes_tile_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: current_nodes_tile_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX current_nodes_tile_idx ON current_nodes USING btree (tile); -- --- Name: current_nodes_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: current_nodes_timestamp_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX current_nodes_timestamp_idx ON current_nodes USING btree ("timestamp"); -- --- Name: current_relation_members_member_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: current_relation_members_member_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX current_relation_members_member_idx ON current_relation_members USING btree (member_type, member_id); -- --- Name: current_relations_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: current_relations_timestamp_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX current_relations_timestamp_idx ON current_relations USING btree ("timestamp"); -- --- Name: current_way_nodes_node_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: current_way_nodes_node_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX current_way_nodes_node_idx ON current_way_nodes USING btree (node_id); -- --- Name: current_ways_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: current_ways_timestamp_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX current_ways_timestamp_idx ON current_ways USING btree ("timestamp"); -- --- Name: diary_comment_user_id_created_at_index; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: diary_comment_user_id_created_at_index; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX diary_comment_user_id_created_at_index ON diary_comments USING btree (user_id, created_at); -- --- Name: diary_comments_entry_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: diary_comments_entry_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX diary_comments_entry_id_idx ON diary_comments USING btree (diary_entry_id, id); -- --- Name: diary_entry_created_at_index; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: diary_entry_created_at_index; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX diary_entry_created_at_index ON diary_entries USING btree (created_at); -- --- Name: diary_entry_language_code_created_at_index; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: diary_entry_language_code_created_at_index; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX diary_entry_language_code_created_at_index ON diary_entries USING btree (language_code, created_at); -- --- Name: diary_entry_user_id_created_at_index; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: diary_entry_user_id_created_at_index; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX diary_entry_user_id_created_at_index ON diary_entries USING btree (user_id, created_at); -- --- Name: friends_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: friends_user_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX friends_user_id_idx ON friends USING btree (user_id); -- --- Name: gpx_file_tags_gpxid_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: gpx_file_tags_gpxid_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX gpx_file_tags_gpxid_idx ON gpx_file_tags USING btree (gpx_id); -- --- Name: gpx_file_tags_tag_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: gpx_file_tags_tag_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX gpx_file_tags_tag_idx ON gpx_file_tags USING btree (tag); -- --- Name: gpx_files_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: gpx_files_timestamp_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX gpx_files_timestamp_idx ON gpx_files USING btree ("timestamp"); -- --- Name: gpx_files_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: gpx_files_user_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX gpx_files_user_id_idx ON gpx_files USING btree (user_id); -- --- Name: gpx_files_visible_visibility_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: gpx_files_visible_visibility_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX gpx_files_visible_visibility_idx ON gpx_files USING btree (visible, visibility); -- --- Name: index_changeset_comments_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_changeset_comments_on_created_at; Type: INDEX; Schema: public; Owner: - -- 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: +-- Name: index_changesets_subscribers_on_changeset_id; Type: INDEX; Schema: public; Owner: - -- 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: +-- Name: index_changesets_subscribers_on_subscriber_id_and_changeset_id; Type: INDEX; Schema: public; Owner: - -- 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: +-- Name: index_client_applications_on_key; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_client_applications_on_key ON client_applications USING btree (key); -- --- Name: index_issue_comments_on_commenter_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_issue_comments_on_commenter_user_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_issue_comments_on_commenter_user_id ON issue_comments USING btree (commenter_user_id); -- --- Name: index_issue_comments_on_issue_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_issue_comments_on_issue_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_issue_comments_on_issue_id ON issue_comments USING btree (issue_id); -- --- Name: index_issues_on_reportable_id_and_reportable_type; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_issues_on_reportable_id_and_reportable_type; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_issues_on_reportable_id_and_reportable_type ON issues USING btree (reportable_id, reportable_type); -- --- Name: index_issues_on_reported_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_issues_on_reported_user_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_issues_on_reported_user_id ON issues USING btree (reported_user_id); -- --- Name: index_issues_on_updated_by; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_issues_on_updated_by; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_issues_on_updated_by ON issues USING btree (updated_by); -- --- Name: index_note_comments_on_body; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_note_comments_on_body; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_note_comments_on_body ON note_comments USING gin (to_tsvector('english'::regconfig, body)); -- --- Name: index_note_comments_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_note_comments_on_created_at; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_note_comments_on_created_at ON note_comments USING btree (created_at); -- --- Name: index_oauth_nonces_on_nonce_and_timestamp; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_oauth_nonces_on_nonce_and_timestamp; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_oauth_nonces_on_nonce_and_timestamp ON oauth_nonces USING btree (nonce, "timestamp"); -- --- Name: index_oauth_tokens_on_token; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_oauth_tokens_on_token; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_oauth_tokens_on_token ON oauth_tokens USING btree (token); -- --- Name: index_reports_on_issue_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_reports_on_issue_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_reports_on_issue_id ON reports USING btree (issue_id); -- --- Name: index_reports_on_reporter_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_reports_on_reporter_user_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_reports_on_reporter_user_id ON reports USING btree (reporter_user_id); -- --- Name: index_user_blocks_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: index_user_blocks_on_user_id; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX index_user_blocks_on_user_id ON user_blocks USING btree (user_id); -- --- Name: messages_from_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: messages_from_user_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX messages_from_user_id_idx ON messages USING btree (from_user_id); -- --- Name: messages_to_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: messages_to_user_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX messages_to_user_id_idx ON messages USING btree (to_user_id); -- --- Name: nodes_changeset_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: nodes_changeset_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX nodes_changeset_id_idx ON nodes USING btree (changeset_id); -- --- Name: nodes_tile_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: nodes_tile_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX nodes_tile_idx ON nodes USING btree (tile); -- --- Name: nodes_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: nodes_timestamp_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX nodes_timestamp_idx ON nodes USING btree ("timestamp"); -- --- Name: note_comments_note_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: note_comments_note_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX note_comments_note_id_idx ON note_comments USING btree (note_id); -- --- Name: notes_created_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: notes_created_at_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX notes_created_at_idx ON notes USING btree (created_at); -- --- Name: notes_tile_status_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: notes_tile_status_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX notes_tile_status_idx ON notes USING btree (tile, status); -- --- Name: notes_updated_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: notes_updated_at_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX notes_updated_at_idx ON notes USING btree (updated_at); -- --- Name: points_gpxid_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: points_gpxid_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX points_gpxid_idx ON gps_points USING btree (gpx_id); -- --- Name: points_tile_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: points_tile_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX points_tile_idx ON gps_points USING btree (tile); -- --- Name: relation_members_member_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: relation_members_member_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX relation_members_member_idx ON relation_members USING btree (member_type, member_id); -- --- Name: relations_changeset_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: relations_changeset_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX relations_changeset_id_idx ON relations USING btree (changeset_id); -- --- Name: relations_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: relations_timestamp_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX relations_timestamp_idx ON relations USING btree ("timestamp"); -- --- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version); -- --- Name: user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: user_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX user_id_idx ON friends USING btree (friend_user_id); -- --- Name: user_roles_id_role_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: user_roles_id_role_unique; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX user_roles_id_role_unique ON user_roles USING btree (user_id, role); -- --- Name: user_tokens_token_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: user_tokens_token_idx; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX user_tokens_token_idx ON user_tokens USING btree (token); -- --- Name: user_tokens_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: user_tokens_user_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX user_tokens_user_id_idx ON user_tokens USING btree (user_id); -- --- Name: users_auth_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: users_auth_idx; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX users_auth_idx ON users USING btree (auth_provider, auth_uid); -- --- Name: users_display_name_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: users_display_name_idx; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX users_display_name_idx ON users USING btree (display_name); -- --- Name: users_display_name_lower_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: users_display_name_lower_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX users_display_name_lower_idx ON users USING btree (lower((display_name)::text)); -- --- Name: users_email_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: users_email_idx; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX users_email_idx ON users USING btree (email); -- --- Name: users_email_lower_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: users_email_lower_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX users_email_lower_idx ON users USING btree (lower((email)::text)); -- --- Name: way_nodes_node_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: way_nodes_node_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX way_nodes_node_idx ON way_nodes USING btree (node_id); -- --- Name: ways_changeset_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: ways_changeset_id_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX ways_changeset_id_idx ON ways USING btree (changeset_id); -- --- Name: ways_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- Name: ways_timestamp_idx; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX ways_timestamp_idx ON ways USING btree ("timestamp"); diff --git a/test/controllers/issues_controller_test.rb b/test/controllers/issues_controller_test.rb index d42b37ae5..1696df498 100644 --- a/test/controllers/issues_controller_test.rb +++ b/test/controllers/issues_controller_test.rb @@ -1,7 +1,7 @@ require "test_helper" class IssuesControllerTest < ActionController::TestCase - fixtures :users, :user_roles + fixtures :users, :user_roles, :issues def test_view_dashboard_without_auth # Access issues_path without login @@ -18,12 +18,19 @@ class IssuesControllerTest < ActionController::TestCase # Access issues_path by admin session[:user] = users(:administrator_user).id get :index - assert_response :success + # this is redirected because there are no issues?! + assert_response :redirect + assert_redirected_to issues_path # Access issues_path by moderator session[:user] = users(:moderator_user).id get :index - assert_response :success + # this is redirected because there are no issues?! + assert_response :redirect + assert_redirected_to issues_path + + # clear session + session.delete(:user) end def test_new_issue_without_login @@ -54,6 +61,9 @@ class IssuesControllerTest < ActionController::TestCase assert_equal Issue.count, 1 assert_response :redirect assert_redirected_to root_path + + # clear session + session.delete(:user) end def test_new_report_with_incomplete_details @@ -99,6 +109,9 @@ class IssuesControllerTest < ActionController::TestCase end assert_response :redirect assert_equal Issue.find_by_reportable_id_and_reportable_type(1, "User").reports.count, 1 + + # clear session + session.delete(:user) end def test_new_report_with_complete_details @@ -136,6 +149,9 @@ class IssuesControllerTest < ActionController::TestCase assert_response :redirect report_count = Issue.find_by_reportable_id_and_reportable_type(1, "User").reports.count assert_equal report_count, 2 + + # clear session + session.delete(:user) end def test_change_status_by_normal_user @@ -150,6 +166,9 @@ class IssuesControllerTest < ActionController::TestCase assert_response :redirect assert_redirected_to root_path + + # clear session + session.delete(:user) end def test_change_status_by_admin @@ -178,6 +197,9 @@ class IssuesControllerTest < ActionController::TestCase get :ignore, :id => Issue.find_by_reportable_id_and_reportable_type(1, "User").id assert_equal Issue.find_by_reportable_id_and_reportable_type(1, "User").ignored?, true assert_response :redirect + + # clear session + session.delete(:user) end def test_search_issues @@ -204,6 +226,9 @@ class IssuesControllerTest < ActionController::TestCase # Find Issue against user_id:2 get :index, :search_by_user => "test2" assert_response :success + + # clear session + session.delete(:user) end def test_comment_by_normal_user @@ -228,5 +253,8 @@ class IssuesControllerTest < ActionController::TestCase get :comment, :id => @issue.id, :issue_comment => { :body => "test comment" } assert_response :redirect assert_redirected_to @issue + + # clear session + session.delete(:user) end end diff --git a/test/fixtures/issues.yml b/test/fixtures/issues.yml index 480a6568f..efe428eb4 100644 --- a/test/fixtures/issues.yml +++ b/test/fixtures/issues.yml @@ -1,21 +1,23 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html -one: - reportable_type: MyString - reportable_id: 1 - user_id: 1 - status: 1 - resolved_at: 2015-05-16 13:06:16 - resolved_by: 1 - created_at: 2015-05-16 13:06:16 - updated_at: 2015-05-16 13:06:16 +# one: +# reportable_type: User +# reportable_id: 1 +# reported_user_id: 1 +# status: 1 +# issue_type: administrator +# resolved_at: 2015-05-16 13:06:16 +# resolved_by: 1 +# created_at: 2015-05-16 13:06:16 +# updated_at: 2015-05-16 13:06:16 -two: - reportable_type: MyString - reportable_id: 1 - user_id: 1 - status: 1 - resolved_at: 2015-05-16 13:06:16 - resolved_by: 1 - created_at: 2015-05-16 13:06:16 - updated_at: 2015-05-16 13:06:16 +# two: +# reportable_type: User +# reportable_id: 1 +# reported_user_id: 1 +# status: 1 +# issue_type: moderator +# resolved_at: 2015-05-16 13:06:16 +# resolved_by: 1 +# created_at: 2015-05-16 13:06:16 +# updated_at: 2015-05-16 13:06:16 -- 2.43.2