SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
reportable_type character varying NOT NULL,
reportable_id integer NOT NULL,
reported_user_id integer,
reportable_type character varying NOT NULL,
reportable_id integer NOT NULL,
reported_user_id integer,
assigned_role user_role_enum NOT NULL,
resolved_at timestamp without time zone,
resolved_by integer,
assigned_role user_role_enum NOT NULL,
resolved_at timestamp without time zone,
resolved_by integer,
details text NOT NULL,
category character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
details text NOT NULL,
category character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
diary_entries_count integer DEFAULT 0 NOT NULL,
image_use_gravatar boolean DEFAULT false NOT NULL,
image_content_type character varying(255),
diary_entries_count integer DEFAULT 0 NOT NULL,
image_use_gravatar boolean DEFAULT false NOT NULL,
image_content_type character varying(255),
--- Name: index_issues_on_reportable_id_and_reportable_type; Type: INDEX; Schema: public; Owner: -
+-- 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: -
--- Name: messages_from_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+-- Name: issues issues_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY issues
+ ADD CONSTRAINT issues_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES users(id);
+
+
+--
+-- Name: messages messages_from_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -