diff --git a/db/migrate/20250722004928_drop_domain_fa_posts_table.rb b/db/migrate/20250722004928_drop_domain_fa_posts_table.rb new file mode 100644 index 00000000..07047519 --- /dev/null +++ b/db/migrate/20250722004928_drop_domain_fa_posts_table.rb @@ -0,0 +1,5 @@ +class DropDomainFaPostsTable < ActiveRecord::Migration[7.2] + def change + drop_table :domain_fa_posts + end +end diff --git a/db/migrate/20250722005329_drop_log_store_sst_entries.rb b/db/migrate/20250722005329_drop_log_store_sst_entries.rb new file mode 100644 index 00000000..d878d0be --- /dev/null +++ b/db/migrate/20250722005329_drop_log_store_sst_entries.rb @@ -0,0 +1,5 @@ +class DropLogStoreSstEntries < ActiveRecord::Migration[7.2] + def change + drop_table :log_store_sst_entries + end +end diff --git a/db/migrate/20250722005417_drop_flat_sst_entries.rb b/db/migrate/20250722005417_drop_flat_sst_entries.rb new file mode 100644 index 00000000..428562de --- /dev/null +++ b/db/migrate/20250722005417_drop_flat_sst_entries.rb @@ -0,0 +1,5 @@ +class DropFlatSstEntries < ActiveRecord::Migration[7.2] + def change + drop_table :flat_sst_entries + end +end diff --git a/db/structure.sql b/db/structure.sql index e80d265a..11ced6ef 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1338,55 +1338,6 @@ CREATE TABLE public.domain_fa_post_factors ( ); --- --- Name: domain_fa_posts; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_fa_posts ( - id bigint NOT NULL, - fa_id integer, - creator_id bigint, - file_url_str character varying, - file_id bigint, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL, - state integer, - state_detail jsonb, - log_entry_detail_backup jsonb, - json_attributes jsonb DEFAULT '{}'::jsonb, - posted_at_backup timestamp(6) without time zone, - num_views_backup integer, - num_comments_backup integer, - num_favorites_backup integer, - keywords_backup jsonb, - description_backup character varying, - gender_backup character varying, - species_backup character varying, - theme_backup character varying, - category_backup character varying, - title_backup character varying -); - - --- --- Name: domain_fa_posts_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_fa_posts_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_fa_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_fa_posts_id_seq OWNED BY public.domain_fa_posts.id; - - -- -- Name: domain_fa_user_avatar_versions; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai -- @@ -2527,16 +2478,6 @@ ALTER SEQUENCE public.domain_users_inkbunny_aux_base_table_id_seq OWNED BY publi SET default_tablespace = ''; --- --- Name: flat_sst_entries; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE public.flat_sst_entries ( - key bytea NOT NULL, - contents bytea NOT NULL -); - - -- -- Name: global_states; Type: TABLE; Schema: public; Owner: - -- @@ -2855,18 +2796,6 @@ CREATE SEQUENCE public.ip_address_roles_id_seq ALTER SEQUENCE public.ip_address_roles_id_seq OWNED BY public.ip_address_roles.id; --- --- Name: log_store_sst_entries; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE public.log_store_sst_entries ( - key bytea NOT NULL, - value bytea NOT NULL, - base_key bytea, - contents bytea -); - - SET default_tablespace = mirai; -- @@ -3524,13 +3453,6 @@ ALTER TABLE ONLY public.domain_e621_users ALTER COLUMN id SET DEFAULT nextval('p ALTER TABLE ONLY public.domain_fa_fav_id_and_dates ALTER COLUMN id SET DEFAULT nextval('public.domain_fa_fav_id_and_dates_id_seq'::regclass); --- --- Name: domain_fa_posts id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_posts ALTER COLUMN id SET DEFAULT nextval('public.domain_fa_posts_id_seq'::regclass); - - -- -- Name: domain_fa_user_avatar_versions id; Type: DEFAULT; Schema: public; Owner: - -- @@ -3840,14 +3762,6 @@ ALTER TABLE ONLY public.domain_fa_fav_id_and_dates ADD CONSTRAINT domain_fa_fav_id_and_dates_pkey PRIMARY KEY (id); --- --- Name: domain_fa_posts domain_fa_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: mirai --- - -ALTER TABLE ONLY public.domain_fa_posts - ADD CONSTRAINT domain_fa_posts_pkey PRIMARY KEY (id); - - -- -- Name: domain_fa_user_avatar_versions domain_fa_user_avatar_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: mirai -- @@ -5020,27 +4934,6 @@ CREATE INDEX index_domain_fa_post_factors_on_for_favorite ON public.domain_fa_po CREATE UNIQUE INDEX index_domain_fa_post_factors_on_post_id ON public.domain_fa_post_factors USING btree (post_id); --- --- Name: index_domain_fa_posts_on_creator_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_fa_posts_on_creator_id ON public.domain_fa_posts USING btree (creator_id); - - --- --- Name: index_domain_fa_posts_on_fa_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_domain_fa_posts_on_fa_id ON public.domain_fa_posts USING btree (fa_id) INCLUDE (id); - - --- --- Name: index_domain_fa_posts_on_file_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_fa_posts_on_file_id ON public.domain_fa_posts USING btree (file_id); - - -- -- Name: index_domain_fa_user_avatar_versions_on_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai -- @@ -5667,17 +5560,6 @@ SET default_tablespace = ''; CREATE INDEX index_e621_posts_on_scanned_post_favs_at ON public.domain_e621_posts USING btree (((json_attributes -> 'scanned_post_favs_at'::text))); -SET default_tablespace = mirai; - --- --- Name: index_flat_sst_entries_on_key; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_flat_sst_entries_on_key ON public.flat_sst_entries USING btree (key); - - -SET default_tablespace = ''; - -- -- Name: index_global_states_on_key; Type: INDEX; Schema: public; Owner: - -- @@ -5880,13 +5762,6 @@ CREATE UNIQUE INDEX index_ip_address_roles_on_ip_address ON public.ip_address_ro SET default_tablespace = mirai; --- --- Name: index_log_store_sst_entries_on_key; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_log_store_sst_entries_on_key ON public.log_store_sst_entries USING btree (key); - - -- -- Name: index_pghero_query_stats_on_database_and_captured_at; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai -- @@ -6585,14 +6460,6 @@ ALTER TABLE ONLY public.domain_fa_user_avatars ADD CONSTRAINT fk_rails_559463d6ea FOREIGN KEY (user_id) REFERENCES public.domain_fa_users(id); --- --- Name: domain_fa_posts fk_rails_57589f8579; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_posts - ADD CONSTRAINT fk_rails_57589f8579 FOREIGN KEY (creator_id) REFERENCES public.domain_fa_users(id); - - -- -- Name: domain_twitter_medias fk_rails_5fffa41fa6; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6857,14 +6724,6 @@ ALTER TABLE ONLY public.domain_user_post_creations ADD CONSTRAINT fk_rails_f3c2231511 FOREIGN KEY (post_id) REFERENCES public.domain_posts(id); --- --- Name: domain_fa_posts fk_rails_f5d5c17363; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_posts - ADD CONSTRAINT fk_rails_f5d5c17363 FOREIGN KEY (file_id) REFERENCES public.http_log_entries(id); - - -- -- Name: domain_user_avatars fk_rails_f89912a20f; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6888,6 +6747,9 @@ ALTER TABLE ONLY public.domain_twitter_tweets SET search_path TO "$user", public; INSERT INTO "schema_migrations" (version) VALUES +('20250722005417'), +('20250722005329'), +('20250722004928'), ('20250721193212'), ('20250721172316'), ('20250721171216'),