X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/7dbf8d83369cb73929080c4ba23fdd7dcd0184df..d70529f12b0d7333497252a67c14ef2d87e55a78:/db/structure.sql diff --git a/db/structure.sql b/db/structure.sql index 077faffad..dcab302bb 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -494,6 +494,45 @@ CREATE SEQUENCE current_ways_id_seq ALTER SEQUENCE current_ways_id_seq OWNED BY current_ways.id; +-- +-- Name: delayed_jobs; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE delayed_jobs ( + id bigint NOT NULL, + priority integer DEFAULT 0 NOT NULL, + attempts integer DEFAULT 0 NOT NULL, + handler text NOT NULL, + last_error text, + run_at timestamp without time zone, + locked_at timestamp without time zone, + failed_at timestamp without time zone, + locked_by character varying, + queue character varying, + created_at timestamp without time zone, + updated_at timestamp without time zone +); + + +-- +-- Name: delayed_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE delayed_jobs_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: delayed_jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE delayed_jobs_id_seq OWNED BY delayed_jobs.id; + + -- -- Name: diary_comments; Type: TABLE; Schema: public; Owner: - -- @@ -1365,6 +1404,13 @@ ALTER TABLE ONLY current_relations ALTER COLUMN id SET DEFAULT nextval('current_ ALTER TABLE ONLY current_ways ALTER COLUMN id SET DEFAULT nextval('current_ways_id_seq'::regclass); +-- +-- Name: delayed_jobs id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY delayed_jobs ALTER COLUMN id SET DEFAULT nextval('delayed_jobs_id_seq'::regclass); + + -- -- Name: diary_comments id; Type: DEFAULT; Schema: public; Owner: - -- @@ -1401,21 +1447,21 @@ ALTER TABLE ONLY gpx_files ALTER COLUMN id SET DEFAULT nextval('gpx_files_id_seq -- --- Name: messages id; Type: DEFAULT; Schema: public; Owner: - +-- Name: issue_comments id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY issue_comments ALTER COLUMN id SET DEFAULT nextval('issue_comments_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: issues id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY issues ALTER COLUMN id SET DEFAULT nextval('issues_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: messages id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY messages ALTER COLUMN id SET DEFAULT nextval('messages_id_seq'::regclass); @@ -1457,14 +1503,14 @@ ALTER TABLE ONLY redactions ALTER COLUMN id SET DEFAULT nextval('redactions_id_s -- --- Name: user_blocks id; Type: DEFAULT; Schema: public; Owner: - +-- Name: reports id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY reports ALTER COLUMN id SET DEFAULT nextval('reports_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: user_blocks id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY user_blocks ALTER COLUMN id SET DEFAULT nextval('user_blocks_id_seq'::regclass); @@ -1595,6 +1641,14 @@ ALTER TABLE ONLY current_ways ADD CONSTRAINT current_ways_pkey PRIMARY KEY (id); +-- +-- Name: delayed_jobs delayed_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY delayed_jobs + ADD CONSTRAINT delayed_jobs_pkey PRIMARY KEY (id); + + -- -- Name: diary_comments diary_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -1644,7 +1698,7 @@ ALTER TABLE ONLY gpx_files -- --- Name: issue_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: issue_comments issue_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY issue_comments @@ -1652,7 +1706,7 @@ ALTER TABLE ONLY issue_comments -- --- Name: issues_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: issues issues_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY issues @@ -1756,7 +1810,7 @@ ALTER TABLE ONLY relations -- --- Name: reports_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: reports reports_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY reports @@ -1918,6 +1972,13 @@ CREATE INDEX current_way_nodes_node_idx ON current_way_nodes USING btree (node_i CREATE INDEX current_ways_timestamp_idx ON current_ways USING btree ("timestamp"); +-- +-- Name: delayed_jobs_priority; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX delayed_jobs_priority ON delayed_jobs USING btree (priority, run_at); + + -- -- Name: diary_comment_user_id_created_at_index; Type: INDEX; Schema: public; Owner: - -- @@ -2051,6 +2112,13 @@ CREATE INDEX index_issue_comments_on_issue_id ON issue_comments USING btree (iss CREATE INDEX index_issue_comments_on_user_id ON issue_comments USING btree (user_id); +-- +-- Name: index_issues_on_assigned_role; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_issues_on_assigned_role ON issues USING btree (assigned_role); + + -- -- Name: index_issues_on_reportable_type_and_reportable_id; Type: INDEX; Schema: public; Owner: - -- @@ -2065,6 +2133,13 @@ CREATE INDEX index_issues_on_reportable_type_and_reportable_id ON issues USING b CREATE INDEX index_issues_on_reported_user_id ON issues USING btree (reported_user_id); +-- +-- Name: index_issues_on_status; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_issues_on_status ON issues USING btree (status); + + -- -- Name: index_issues_on_updated_by; Type: INDEX; Schema: public; Owner: - -- @@ -2541,7 +2616,7 @@ ALTER TABLE ONLY gpx_files -- --- Name: issue_comments_issue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: issue_comments issue_comments_issue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY issue_comments @@ -2549,7 +2624,7 @@ ALTER TABLE ONLY issue_comments -- --- Name: issue_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: issue_comments issue_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY issue_comments @@ -2557,7 +2632,7 @@ ALTER TABLE ONLY issue_comments -- --- Name: issues_reported_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: issues issues_reported_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY issues @@ -2565,7 +2640,7 @@ ALTER TABLE ONLY issues -- --- Name: issues_resolved_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: issues issues_resolved_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY issues @@ -2573,7 +2648,7 @@ ALTER TABLE ONLY issues -- --- Name: issues_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: issues issues_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY issues @@ -2693,7 +2768,7 @@ ALTER TABLE ONLY relations -- --- Name: reports_issue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: reports reports_issue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY reports @@ -2701,7 +2776,7 @@ ALTER TABLE ONLY reports -- --- Name: reports_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: reports reports_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY reports @@ -2856,6 +2931,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20161011010929'), ('20170222134109'), ('20180204153242'), +('20181031113522'), ('21'), ('22'), ('23'),