diff --git a/db/migrate/20170316224630_drop_post_versions.rb b/db/migrate/20170316224630_drop_post_versions.rb new file mode 100644 index 000000000..45e5da0b6 --- /dev/null +++ b/db/migrate/20170316224630_drop_post_versions.rb @@ -0,0 +1,6 @@ +class DropPostVersions < ActiveRecord::Migration + def change + execute "set statement_timeout = 0" + drop_table :post_versions + end +end diff --git a/db/structure.sql b/db/structure.sql index 1873e5a11..db56a9db0 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -2761,43 +2761,6 @@ CREATE UNLOGGED TABLE post_updates ( ); --- --- Name: post_versions; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE post_versions ( - id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - post_id integer NOT NULL, - tags text DEFAULT ''::text NOT NULL, - rating character(1), - parent_id integer, - source text, - updater_id integer NOT NULL, - updater_ip_addr inet NOT NULL -); - - --- --- Name: post_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE post_versions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: post_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE post_versions_id_seq OWNED BY post_versions.id; - - -- -- Name: post_votes; Type: TABLE; Schema: public; Owner: - -- @@ -4380,13 +4343,6 @@ ALTER TABLE ONLY post_disapprovals ALTER COLUMN id SET DEFAULT nextval('post_dis ALTER TABLE ONLY post_flags ALTER COLUMN id SET DEFAULT nextval('post_flags_id_seq'::regclass); --- --- Name: id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY post_versions ALTER COLUMN id SET DEFAULT nextval('post_versions_id_seq'::regclass); - - -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- @@ -4796,14 +4752,6 @@ ALTER TABLE ONLY post_flags ADD CONSTRAINT post_flags_pkey PRIMARY KEY (id); --- --- Name: post_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY post_versions - ADD CONSTRAINT post_versions_pkey PRIMARY KEY (id); - - -- -- Name: post_votes_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -6912,34 +6860,6 @@ CREATE INDEX index_post_flags_on_creator_ip_addr ON post_flags USING btree (crea CREATE INDEX index_post_flags_on_post_id ON post_flags USING btree (post_id); --- --- Name: index_post_versions_on_post_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_post_versions_on_post_id ON post_versions USING btree (post_id); - - --- --- Name: index_post_versions_on_updated_at_and_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_post_versions_on_updated_at_and_id ON post_versions USING btree (updated_at, id); - - --- --- Name: index_post_versions_on_updater_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_post_versions_on_updater_id ON post_versions USING btree (updater_id); - - --- --- Name: index_post_versions_on_updater_ip_addr; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_post_versions_on_updater_ip_addr ON post_versions USING btree (updater_ip_addr); - - -- -- Name: index_post_votes_on_post_id; Type: INDEX; Schema: public; Owner: - -- @@ -7610,3 +7530,5 @@ INSERT INTO schema_migrations (version) VALUES ('20170314204631'); INSERT INTO schema_migrations (version) VALUES ('20170314235626'); +INSERT INTO schema_migrations (version) VALUES ('20170316224630'); +