diff --git a/db/migrate/20220106172910_drop_unused_post_columns.rb b/db/migrate/20220106172910_drop_unused_post_columns.rb new file mode 100644 index 000000000..0696c37f8 --- /dev/null +++ b/db/migrate/20220106172910_drop_unused_post_columns.rb @@ -0,0 +1,10 @@ +class DropUnusedPostColumns < ActiveRecord::Migration[6.1] + def change + remove_column :posts, :is_note_locked, :boolean, default: false, null: false + remove_column :posts, :is_rating_locked, :boolean, default: false, null: false + remove_column :posts, :is_status_locked, :boolean, default: false, null: false + remove_column :posts, :tag_index, :tsvector + remove_column :posts, :fav_string, :text, default: "", null: false + remove_column :posts, :pool_string, :text, default: "", null: false + end +end diff --git a/db/structure.sql b/db/structure.sql index 9431622b3..690c113b3 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -865,23 +865,17 @@ CREATE TABLE public.posts ( image_height integer NOT NULL, uploader_ip_addr inet NOT NULL, tag_string text DEFAULT ''::text NOT NULL, - is_note_locked boolean DEFAULT false NOT NULL, fav_count integer DEFAULT 0 NOT NULL, file_ext character varying NOT NULL, last_noted_at timestamp without time zone, - is_rating_locked boolean DEFAULT false NOT NULL, parent_id integer, has_children boolean DEFAULT false NOT NULL, approver_id integer, - tag_index tsvector, tag_count_general integer DEFAULT 0 NOT NULL, tag_count_artist integer DEFAULT 0 NOT NULL, tag_count_character integer DEFAULT 0 NOT NULL, tag_count_copyright integer DEFAULT 0 NOT NULL, file_size integer NOT NULL, - is_status_locked boolean DEFAULT false NOT NULL, - fav_string text DEFAULT ''::text NOT NULL, - pool_string text DEFAULT ''::text NOT NULL, up_score integer DEFAULT 0 NOT NULL, down_score integer DEFAULT 0 NOT NULL, is_pending boolean DEFAULT false NOT NULL, @@ -5059,6 +5053,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20211121080239'), ('20220101224048'), ('20220104214319'), -('20220106171727'); +('20220106171727'), +('20220106172910');