From 8d65c2514a3f49f582259b32135a86a31268c104 Mon Sep 17 00:00:00 2001 From: Dylan Knutson Date: Tue, 22 Jul 2025 04:54:12 +0000 Subject: [PATCH] drop legacy domain tables --- ...50722005802_move_blob_files_tablespaces.rb | 14 + ...50722010327_drop_old_e621_domain_tables.rb | 13 + ...0250722010822_drop_old_fa_domain_tables.rb | 15 + ...0250722013801_drop_old_ib_domain_tables.rb | 17 + db/structure.sql | 1657 ++--------------- justfile | 3 - 6 files changed, 192 insertions(+), 1527 deletions(-) create mode 100644 db/migrate/20250722005802_move_blob_files_tablespaces.rb create mode 100644 db/migrate/20250722010327_drop_old_e621_domain_tables.rb create mode 100644 db/migrate/20250722010822_drop_old_fa_domain_tables.rb create mode 100644 db/migrate/20250722013801_drop_old_ib_domain_tables.rb diff --git a/db/migrate/20250722005802_move_blob_files_tablespaces.rb b/db/migrate/20250722005802_move_blob_files_tablespaces.rb new file mode 100644 index 00000000..196c74b1 --- /dev/null +++ b/db/migrate/20250722005802_move_blob_files_tablespaces.rb @@ -0,0 +1,14 @@ +class MoveBlobFilesTablespaces < ActiveRecord::Migration[7.2] + disable_ddl_transaction! + + def up + 64.times { |i| execute <<-SQL } + ALTER TABLE blob_files_#{i.to_s.rjust(2, "0")} SET TABLESPACE pg_default; + ALTER INDEX index_blob_files_#{i.to_s.rjust(2, "0")}_on_sha256 SET TABLESPACE pg_default; + SQL + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end diff --git a/db/migrate/20250722010327_drop_old_e621_domain_tables.rb b/db/migrate/20250722010327_drop_old_e621_domain_tables.rb new file mode 100644 index 00000000..5412fec8 --- /dev/null +++ b/db/migrate/20250722010327_drop_old_e621_domain_tables.rb @@ -0,0 +1,13 @@ +class DropOldE621DomainTables < ActiveRecord::Migration[7.2] + def up + drop_table :domain_e621_favs + drop_table :domain_e621_taggings + drop_table :domain_e621_tags + drop_table :domain_e621_posts + drop_table :domain_e621_users + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end diff --git a/db/migrate/20250722010822_drop_old_fa_domain_tables.rb b/db/migrate/20250722010822_drop_old_fa_domain_tables.rb new file mode 100644 index 00000000..b3869246 --- /dev/null +++ b/db/migrate/20250722010822_drop_old_fa_domain_tables.rb @@ -0,0 +1,15 @@ +class DropOldFaDomainTables < ActiveRecord::Migration[7.2] + def up + drop_table :domain_fa_user_avatar_versions + drop_table :domain_fa_user_avatars + drop_table :domain_fa_favs + drop_table :domain_fa_user_factors + drop_table :domain_fa_follows + drop_table :domain_fa_post_factors + drop_table :domain_fa_users + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end diff --git a/db/migrate/20250722013801_drop_old_ib_domain_tables.rb b/db/migrate/20250722013801_drop_old_ib_domain_tables.rb new file mode 100644 index 00000000..23b8de58 --- /dev/null +++ b/db/migrate/20250722013801_drop_old_ib_domain_tables.rb @@ -0,0 +1,17 @@ +class DropOldIbDomainTables < ActiveRecord::Migration[7.2] + def up + drop_table :domain_inkbunny_favs + drop_table :domain_inkbunny_taggings + drop_table :domain_inkbunny_pool_joins + drop_table :domain_inkbunny_follows + drop_table :domain_inkbunny_pools + drop_table :domain_inkbunny_tags + drop_table :domain_inkbunny_files + drop_table :domain_inkbunny_posts + drop_table :domain_inkbunny_users + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end diff --git a/db/structure.sql b/db/structure.sql index 11ced6ef..f97029b1 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -218,10 +218,8 @@ CREATE TABLE public.blob_files ( PARTITION BY HASH (sha256); -SET default_tablespace = mirai; - -- --- Name: blob_files_00; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_00; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_00 ( @@ -235,7 +233,7 @@ CREATE TABLE public.blob_files_00 ( -- --- Name: blob_files_01; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_01; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_01 ( @@ -249,7 +247,7 @@ CREATE TABLE public.blob_files_01 ( -- --- Name: blob_files_02; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_02; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_02 ( @@ -263,7 +261,7 @@ CREATE TABLE public.blob_files_02 ( -- --- Name: blob_files_03; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_03; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_03 ( @@ -277,7 +275,7 @@ CREATE TABLE public.blob_files_03 ( -- --- Name: blob_files_04; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_04; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_04 ( @@ -291,7 +289,7 @@ CREATE TABLE public.blob_files_04 ( -- --- Name: blob_files_05; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_05; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_05 ( @@ -305,7 +303,7 @@ CREATE TABLE public.blob_files_05 ( -- --- Name: blob_files_06; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_06; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_06 ( @@ -319,7 +317,7 @@ CREATE TABLE public.blob_files_06 ( -- --- Name: blob_files_07; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_07; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_07 ( @@ -333,7 +331,7 @@ CREATE TABLE public.blob_files_07 ( -- --- Name: blob_files_08; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_08; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_08 ( @@ -347,7 +345,7 @@ CREATE TABLE public.blob_files_08 ( -- --- Name: blob_files_09; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_09; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_09 ( @@ -361,7 +359,7 @@ CREATE TABLE public.blob_files_09 ( -- --- Name: blob_files_10; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_10; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_10 ( @@ -375,7 +373,7 @@ CREATE TABLE public.blob_files_10 ( -- --- Name: blob_files_11; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_11; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_11 ( @@ -389,7 +387,7 @@ CREATE TABLE public.blob_files_11 ( -- --- Name: blob_files_12; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_12; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_12 ( @@ -403,7 +401,7 @@ CREATE TABLE public.blob_files_12 ( -- --- Name: blob_files_13; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_13; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_13 ( @@ -417,7 +415,7 @@ CREATE TABLE public.blob_files_13 ( -- --- Name: blob_files_14; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_14; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_14 ( @@ -431,7 +429,7 @@ CREATE TABLE public.blob_files_14 ( -- --- Name: blob_files_15; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_15; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_15 ( @@ -445,7 +443,7 @@ CREATE TABLE public.blob_files_15 ( -- --- Name: blob_files_16; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_16; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_16 ( @@ -459,7 +457,7 @@ CREATE TABLE public.blob_files_16 ( -- --- Name: blob_files_17; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_17; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_17 ( @@ -473,7 +471,7 @@ CREATE TABLE public.blob_files_17 ( -- --- Name: blob_files_18; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_18; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_18 ( @@ -487,7 +485,7 @@ CREATE TABLE public.blob_files_18 ( -- --- Name: blob_files_19; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_19; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_19 ( @@ -501,7 +499,7 @@ CREATE TABLE public.blob_files_19 ( -- --- Name: blob_files_20; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_20; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_20 ( @@ -515,7 +513,7 @@ CREATE TABLE public.blob_files_20 ( -- --- Name: blob_files_21; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_21; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_21 ( @@ -529,7 +527,7 @@ CREATE TABLE public.blob_files_21 ( -- --- Name: blob_files_22; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_22; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_22 ( @@ -543,7 +541,7 @@ CREATE TABLE public.blob_files_22 ( -- --- Name: blob_files_23; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_23; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_23 ( @@ -557,7 +555,7 @@ CREATE TABLE public.blob_files_23 ( -- --- Name: blob_files_24; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_24; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_24 ( @@ -571,7 +569,7 @@ CREATE TABLE public.blob_files_24 ( -- --- Name: blob_files_25; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_25; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_25 ( @@ -585,7 +583,7 @@ CREATE TABLE public.blob_files_25 ( -- --- Name: blob_files_26; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_26; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_26 ( @@ -599,7 +597,7 @@ CREATE TABLE public.blob_files_26 ( -- --- Name: blob_files_27; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_27; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_27 ( @@ -613,7 +611,7 @@ CREATE TABLE public.blob_files_27 ( -- --- Name: blob_files_28; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_28; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_28 ( @@ -627,7 +625,7 @@ CREATE TABLE public.blob_files_28 ( -- --- Name: blob_files_29; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_29; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_29 ( @@ -641,7 +639,7 @@ CREATE TABLE public.blob_files_29 ( -- --- Name: blob_files_30; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_30; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_30 ( @@ -655,7 +653,7 @@ CREATE TABLE public.blob_files_30 ( -- --- Name: blob_files_31; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_31; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_31 ( @@ -669,7 +667,7 @@ CREATE TABLE public.blob_files_31 ( -- --- Name: blob_files_32; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_32; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_32 ( @@ -683,7 +681,7 @@ CREATE TABLE public.blob_files_32 ( -- --- Name: blob_files_33; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_33; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_33 ( @@ -697,7 +695,7 @@ CREATE TABLE public.blob_files_33 ( -- --- Name: blob_files_34; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_34; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_34 ( @@ -711,7 +709,7 @@ CREATE TABLE public.blob_files_34 ( -- --- Name: blob_files_35; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_35; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_35 ( @@ -725,7 +723,7 @@ CREATE TABLE public.blob_files_35 ( -- --- Name: blob_files_36; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_36; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_36 ( @@ -739,7 +737,7 @@ CREATE TABLE public.blob_files_36 ( -- --- Name: blob_files_37; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_37; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_37 ( @@ -753,7 +751,7 @@ CREATE TABLE public.blob_files_37 ( -- --- Name: blob_files_38; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_38; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_38 ( @@ -767,7 +765,7 @@ CREATE TABLE public.blob_files_38 ( -- --- Name: blob_files_39; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_39; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_39 ( @@ -781,7 +779,7 @@ CREATE TABLE public.blob_files_39 ( -- --- Name: blob_files_40; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_40; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_40 ( @@ -795,7 +793,7 @@ CREATE TABLE public.blob_files_40 ( -- --- Name: blob_files_41; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_41; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_41 ( @@ -809,7 +807,7 @@ CREATE TABLE public.blob_files_41 ( -- --- Name: blob_files_42; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_42; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_42 ( @@ -823,7 +821,7 @@ CREATE TABLE public.blob_files_42 ( -- --- Name: blob_files_43; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_43; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_43 ( @@ -837,7 +835,7 @@ CREATE TABLE public.blob_files_43 ( -- --- Name: blob_files_44; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_44; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_44 ( @@ -851,7 +849,7 @@ CREATE TABLE public.blob_files_44 ( -- --- Name: blob_files_45; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_45; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_45 ( @@ -865,7 +863,7 @@ CREATE TABLE public.blob_files_45 ( -- --- Name: blob_files_46; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_46; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_46 ( @@ -879,7 +877,7 @@ CREATE TABLE public.blob_files_46 ( -- --- Name: blob_files_47; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_47; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_47 ( @@ -893,7 +891,7 @@ CREATE TABLE public.blob_files_47 ( -- --- Name: blob_files_48; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_48; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_48 ( @@ -907,7 +905,7 @@ CREATE TABLE public.blob_files_48 ( -- --- Name: blob_files_49; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_49; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_49 ( @@ -921,7 +919,7 @@ CREATE TABLE public.blob_files_49 ( -- --- Name: blob_files_50; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_50; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_50 ( @@ -935,7 +933,7 @@ CREATE TABLE public.blob_files_50 ( -- --- Name: blob_files_51; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_51; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_51 ( @@ -949,7 +947,7 @@ CREATE TABLE public.blob_files_51 ( -- --- Name: blob_files_52; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_52; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_52 ( @@ -963,7 +961,7 @@ CREATE TABLE public.blob_files_52 ( -- --- Name: blob_files_53; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_53; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_53 ( @@ -977,7 +975,7 @@ CREATE TABLE public.blob_files_53 ( -- --- Name: blob_files_54; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_54; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_54 ( @@ -991,7 +989,7 @@ CREATE TABLE public.blob_files_54 ( -- --- Name: blob_files_55; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_55; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_55 ( @@ -1005,7 +1003,7 @@ CREATE TABLE public.blob_files_55 ( -- --- Name: blob_files_56; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_56; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_56 ( @@ -1019,7 +1017,7 @@ CREATE TABLE public.blob_files_56 ( -- --- Name: blob_files_57; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_57; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_57 ( @@ -1033,7 +1031,7 @@ CREATE TABLE public.blob_files_57 ( -- --- Name: blob_files_58; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_58; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_58 ( @@ -1047,7 +1045,7 @@ CREATE TABLE public.blob_files_58 ( -- --- Name: blob_files_59; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_59; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_59 ( @@ -1061,7 +1059,7 @@ CREATE TABLE public.blob_files_59 ( -- --- Name: blob_files_60; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_60; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_60 ( @@ -1075,7 +1073,7 @@ CREATE TABLE public.blob_files_60 ( -- --- Name: blob_files_61; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_61; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_61 ( @@ -1089,7 +1087,7 @@ CREATE TABLE public.blob_files_61 ( -- --- Name: blob_files_62; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_62; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_62 ( @@ -1103,7 +1101,7 @@ CREATE TABLE public.blob_files_62 ( -- --- Name: blob_files_63; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai +-- Name: blob_files_63; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE public.blob_files_63 ( @@ -1116,162 +1114,7 @@ CREATE TABLE public.blob_files_63 ( ); --- --- Name: domain_e621_favs; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_e621_favs ( - id bigint NOT NULL, - user_id bigint NOT NULL, - post_id bigint NOT NULL, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL -); - - --- --- Name: domain_e621_favs_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_e621_favs_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_e621_favs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_e621_favs_id_seq OWNED BY public.domain_e621_favs.id; - - --- --- Name: domain_e621_posts; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_e621_posts ( - id bigint NOT NULL, - e621_id integer NOT NULL, - state integer NOT NULL, - state_detail jsonb, - md5 character varying, - file_url_str character varying, - description character varying, - rating integer, - score integer, - score_up integer, - score_down integer, - num_favorites integer, - num_comments integer, - change_seq integer, - file_id bigint, - parent_e621_id bigint, - deleted_at timestamp(6) without time zone, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL, - posted_at timestamp(6) without time zone, - json_attributes jsonb DEFAULT '{}'::jsonb -); - - --- --- Name: domain_e621_posts_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_e621_posts_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_e621_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_e621_posts_id_seq OWNED BY public.domain_e621_posts.id; - - --- --- Name: domain_e621_taggings; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_e621_taggings ( - category integer, - post_id bigint NOT NULL, - tag_id bigint NOT NULL -); - - --- --- Name: domain_e621_tags; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_e621_tags ( - id bigint NOT NULL, - name character varying NOT NULL, - type integer, - description character varying, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL -); - - --- --- Name: domain_e621_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_e621_tags_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_e621_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_e621_tags_id_seq OWNED BY public.domain_e621_tags.id; - - --- --- Name: domain_e621_users; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_e621_users ( - id bigint NOT NULL, - e621_user_id integer NOT NULL, - name character varying NOT NULL, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL, - json_attributes jsonb DEFAULT '{}'::jsonb -); - - --- --- Name: domain_e621_users_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_e621_users_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_e621_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_e621_users_id_seq OWNED BY public.domain_e621_users.id; - +SET default_tablespace = mirai; -- -- Name: domain_fa_fav_id_and_dates; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai @@ -1307,481 +1150,8 @@ CREATE SEQUENCE public.domain_fa_fav_id_and_dates_id_seq ALTER SEQUENCE public.domain_fa_fav_id_and_dates_id_seq OWNED BY public.domain_fa_fav_id_and_dates.id; --- --- Name: domain_fa_favs; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_fa_favs ( - user_id bigint NOT NULL, - post_id bigint NOT NULL, - removed boolean DEFAULT false NOT NULL -); - - --- --- Name: domain_fa_follows; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_fa_follows ( - follower_id bigint NOT NULL, - followed_id bigint NOT NULL -); - - --- --- Name: domain_fa_post_factors; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_fa_post_factors ( - post_id bigint, - for_favorite public.vector(32) -); - - --- --- Name: domain_fa_user_avatar_versions; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_fa_user_avatar_versions ( - id bigint NOT NULL, - item_id bigint, - schema_version integer, - event character varying NOT NULL, - diff jsonb, - created_at timestamp(6) without time zone NOT NULL -); - - --- --- Name: domain_fa_user_avatar_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_fa_user_avatar_versions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_fa_user_avatar_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_fa_user_avatar_versions_id_seq OWNED BY public.domain_fa_user_avatar_versions.id; - - --- --- Name: domain_fa_user_avatars; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_fa_user_avatars ( - id bigint NOT NULL, - user_id bigint NOT NULL, - state integer NOT NULL, - state_detail jsonb, - file_url_str character varying, - log_entry_id bigint, - file_sha256 bytea, - downloaded_file_at timestamp(6) without time zone, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL -); - - --- --- Name: domain_fa_user_avatars_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_fa_user_avatars_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_fa_user_avatars_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_fa_user_avatars_id_seq OWNED BY public.domain_fa_user_avatars.id; - - --- --- Name: domain_fa_user_factors; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_fa_user_factors ( - id bigint NOT NULL, - user_id bigint NOT NULL, - for_follower public.vector(32), - for_followed public.vector(32), - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL -); - - --- --- Name: domain_fa_user_factors_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_fa_user_factors_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_fa_user_factors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_fa_user_factors_id_seq OWNED BY public.domain_fa_user_factors.id; - - --- --- Name: domain_fa_users; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_fa_users ( - id bigint NOT NULL, - name character varying NOT NULL, - full_name character varying, - url_name character varying NOT NULL, - artist_type character varying, - mood character varying, - profile_html character varying, - num_pageviews integer, - num_submissions integer, - num_comments_recieved integer, - num_comments_given integer, - num_journals integer, - num_favorites integer, - scanned_gallery_at timestamp(6) without time zone, - scanned_page_at timestamp(6) without time zone, - registered_at timestamp(6) without time zone, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL, - log_entry_detail jsonb, - state integer, - state_detail jsonb, - scanned_follows_at timestamp(6) without time zone, - scanned_favs_at timestamp(6) without time zone -); - - --- --- Name: domain_fa_users_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_fa_users_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_fa_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_fa_users_id_seq OWNED BY public.domain_fa_users.id; - - SET default_tablespace = ''; --- --- Name: domain_inkbunny_favs; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE public.domain_inkbunny_favs ( - user_id bigint NOT NULL, - post_id bigint NOT NULL -); - - --- --- Name: domain_inkbunny_files; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE public.domain_inkbunny_files ( - id bigint NOT NULL, - state integer NOT NULL, - state_detail jsonb DEFAULT '{}'::jsonb NOT NULL, - post_id bigint NOT NULL, - log_entry_id bigint, - blob_entry_sha256 bytea, - file_order integer NOT NULL, - ib_file_id bigint, - ib_detail_raw jsonb, - ib_created_at timestamp(6) without time zone, - file_name character varying, - url_str character varying, - md5_initial character varying, - md5_full character varying, - md5s jsonb, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL -); - - --- --- Name: domain_inkbunny_files_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_inkbunny_files_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_inkbunny_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_inkbunny_files_id_seq OWNED BY public.domain_inkbunny_files.id; - - --- --- Name: domain_inkbunny_follows; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE public.domain_inkbunny_follows ( - follower_id bigint NOT NULL, - followed_id bigint NOT NULL -); - - -SET default_tablespace = mirai; - --- --- Name: domain_inkbunny_pool_joins; Type: TABLE; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE TABLE public.domain_inkbunny_pool_joins ( - id bigint NOT NULL, - post_id bigint, - pool_id bigint, - left_post_id bigint, - right_post_id bigint -); - - --- --- Name: domain_inkbunny_pool_joins_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_inkbunny_pool_joins_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_inkbunny_pool_joins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_inkbunny_pool_joins_id_seq OWNED BY public.domain_inkbunny_pool_joins.id; - - -SET default_tablespace = ''; - --- --- Name: domain_inkbunny_pools; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE public.domain_inkbunny_pools ( - id bigint NOT NULL, - name character varying, - description character varying, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL, - ib_pool_id bigint, - count integer, - deep_update_log_entry_id bigint -); - - --- --- Name: domain_inkbunny_pools_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_inkbunny_pools_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_inkbunny_pools_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_inkbunny_pools_id_seq OWNED BY public.domain_inkbunny_pools.id; - - --- --- Name: domain_inkbunny_posts; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE public.domain_inkbunny_posts ( - id bigint NOT NULL, - state integer NOT NULL, - state_detail jsonb, - shallow_updated_at timestamp(6) without time zone, - deep_updated_at timestamp(6) without time zone, - creator_id bigint, - ib_post_id bigint, - title character varying, - description character varying, - writing character varying, - posted_at timestamp without time zone, - last_file_updated_at timestamp without time zone, - rating integer, - submission_type integer, - num_views integer, - num_files integer, - ib_detail_raw jsonb, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL, - deep_update_log_entry_id bigint, - shallow_update_log_entry_id bigint, - num_favs integer, - num_comments integer, - keywords jsonb -); - - --- --- Name: domain_inkbunny_posts_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_inkbunny_posts_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_inkbunny_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_inkbunny_posts_id_seq OWNED BY public.domain_inkbunny_posts.id; - - --- --- Name: domain_inkbunny_taggings; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE public.domain_inkbunny_taggings ( - id bigint NOT NULL, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL -); - - --- --- Name: domain_inkbunny_taggings_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_inkbunny_taggings_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_inkbunny_taggings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_inkbunny_taggings_id_seq OWNED BY public.domain_inkbunny_taggings.id; - - --- --- Name: domain_inkbunny_tags; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE public.domain_inkbunny_tags ( - id bigint NOT NULL, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL -); - - --- --- Name: domain_inkbunny_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_inkbunny_tags_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_inkbunny_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_inkbunny_tags_id_seq OWNED BY public.domain_inkbunny_tags.id; - - --- --- Name: domain_inkbunny_users; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE public.domain_inkbunny_users ( - id bigint NOT NULL, - state integer NOT NULL, - state_detail json, - name character varying NOT NULL, - ib_user_id bigint NOT NULL, - avatar_url_str character varying, - avatar_file_sha256 bytea, - avatar_file_log_entry_id bigint, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL, - avatar_downloaded_at timestamp(6) without time zone, - avatar_state integer, - avatar_state_detail jsonb DEFAULT '{}'::jsonb NOT NULL, - scanned_gallery_at timestamp(6) without time zone, - deep_update_log_entry_id bigint, - shallow_update_log_entry_id bigint -); - - --- --- Name: domain_inkbunny_users_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.domain_inkbunny_users_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: domain_inkbunny_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE public.domain_inkbunny_users_id_seq OWNED BY public.domain_inkbunny_users.id; - - -- -- Name: domain_post_file_bit_fingerprints; Type: TABLE; Schema: public; Owner: - -- @@ -3418,34 +2788,6 @@ ALTER TABLE ONLY public.blob_files ATTACH PARTITION public.blob_files_62 FOR VAL ALTER TABLE ONLY public.blob_files ATTACH PARTITION public.blob_files_63 FOR VALUES WITH (modulus 64, remainder 63); --- --- Name: domain_e621_favs id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_e621_favs ALTER COLUMN id SET DEFAULT nextval('public.domain_e621_favs_id_seq'::regclass); - - --- --- Name: domain_e621_posts id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_e621_posts ALTER COLUMN id SET DEFAULT nextval('public.domain_e621_posts_id_seq'::regclass); - - --- --- Name: domain_e621_tags id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_e621_tags ALTER COLUMN id SET DEFAULT nextval('public.domain_e621_tags_id_seq'::regclass); - - --- --- Name: domain_e621_users id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_e621_users ALTER COLUMN id SET DEFAULT nextval('public.domain_e621_users_id_seq'::regclass); - - -- -- Name: domain_fa_fav_id_and_dates id; Type: DEFAULT; Schema: public; Owner: - -- @@ -3453,83 +2795,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_user_avatar_versions id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_user_avatar_versions ALTER COLUMN id SET DEFAULT nextval('public.domain_fa_user_avatar_versions_id_seq'::regclass); - - --- --- Name: domain_fa_user_avatars id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_user_avatars ALTER COLUMN id SET DEFAULT nextval('public.domain_fa_user_avatars_id_seq'::regclass); - - --- --- Name: domain_fa_user_factors id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_user_factors ALTER COLUMN id SET DEFAULT nextval('public.domain_fa_user_factors_id_seq'::regclass); - - --- --- Name: domain_fa_users id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_users ALTER COLUMN id SET DEFAULT nextval('public.domain_fa_users_id_seq'::regclass); - - --- --- Name: domain_inkbunny_files id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_files ALTER COLUMN id SET DEFAULT nextval('public.domain_inkbunny_files_id_seq'::regclass); - - --- --- Name: domain_inkbunny_pool_joins id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_pool_joins ALTER COLUMN id SET DEFAULT nextval('public.domain_inkbunny_pool_joins_id_seq'::regclass); - - --- --- Name: domain_inkbunny_pools id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_pools ALTER COLUMN id SET DEFAULT nextval('public.domain_inkbunny_pools_id_seq'::regclass); - - --- --- Name: domain_inkbunny_posts id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_posts ALTER COLUMN id SET DEFAULT nextval('public.domain_inkbunny_posts_id_seq'::regclass); - - --- --- Name: domain_inkbunny_taggings id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_taggings ALTER COLUMN id SET DEFAULT nextval('public.domain_inkbunny_taggings_id_seq'::regclass); - - --- --- Name: domain_inkbunny_tags id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_tags ALTER COLUMN id SET DEFAULT nextval('public.domain_inkbunny_tags_id_seq'::regclass); - - --- --- Name: domain_inkbunny_users id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_users ALTER COLUMN id SET DEFAULT nextval('public.domain_inkbunny_users_id_seq'::regclass); - - -- -- Name: domain_post_file_bit_fingerprints id; Type: DEFAULT; Schema: public; Owner: - -- @@ -3722,38 +2987,6 @@ ALTER TABLE ONLY public.ar_internal_metadata ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key); --- --- Name: domain_e621_favs domain_e621_favs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: mirai --- - -ALTER TABLE ONLY public.domain_e621_favs - ADD CONSTRAINT domain_e621_favs_pkey PRIMARY KEY (id); - - --- --- Name: domain_e621_posts domain_e621_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: mirai --- - -ALTER TABLE ONLY public.domain_e621_posts - ADD CONSTRAINT domain_e621_posts_pkey PRIMARY KEY (id); - - --- --- Name: domain_e621_tags domain_e621_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: mirai --- - -ALTER TABLE ONLY public.domain_e621_tags - ADD CONSTRAINT domain_e621_tags_pkey PRIMARY KEY (id); - - --- --- Name: domain_e621_users domain_e621_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: mirai --- - -ALTER TABLE ONLY public.domain_e621_users - ADD CONSTRAINT domain_e621_users_pkey PRIMARY KEY (id); - - -- -- Name: domain_fa_fav_id_and_dates domain_fa_fav_id_and_dates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: mirai -- @@ -3762,100 +2995,8 @@ 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_user_avatar_versions domain_fa_user_avatar_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: mirai --- - -ALTER TABLE ONLY public.domain_fa_user_avatar_versions - ADD CONSTRAINT domain_fa_user_avatar_versions_pkey PRIMARY KEY (id); - - --- --- Name: domain_fa_user_avatars domain_fa_user_avatars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: mirai --- - -ALTER TABLE ONLY public.domain_fa_user_avatars - ADD CONSTRAINT domain_fa_user_avatars_pkey PRIMARY KEY (id); - - --- --- Name: domain_fa_user_factors domain_fa_user_factors_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: mirai --- - -ALTER TABLE ONLY public.domain_fa_user_factors - ADD CONSTRAINT domain_fa_user_factors_pkey PRIMARY KEY (id); - - --- --- Name: domain_fa_users domain_fa_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: mirai --- - -ALTER TABLE ONLY public.domain_fa_users - ADD CONSTRAINT domain_fa_users_pkey PRIMARY KEY (id); - - SET default_tablespace = ''; --- --- Name: domain_inkbunny_files domain_inkbunny_files_pkey; Type: CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_files - ADD CONSTRAINT domain_inkbunny_files_pkey PRIMARY KEY (id); - - -SET default_tablespace = mirai; - --- --- Name: domain_inkbunny_pool_joins domain_inkbunny_pool_joins_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: mirai --- - -ALTER TABLE ONLY public.domain_inkbunny_pool_joins - ADD CONSTRAINT domain_inkbunny_pool_joins_pkey PRIMARY KEY (id); - - -SET default_tablespace = ''; - --- --- Name: domain_inkbunny_pools domain_inkbunny_pools_pkey; Type: CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_pools - ADD CONSTRAINT domain_inkbunny_pools_pkey PRIMARY KEY (id); - - --- --- Name: domain_inkbunny_posts domain_inkbunny_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_posts - ADD CONSTRAINT domain_inkbunny_posts_pkey PRIMARY KEY (id); - - --- --- Name: domain_inkbunny_taggings domain_inkbunny_taggings_pkey; Type: CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_taggings - ADD CONSTRAINT domain_inkbunny_taggings_pkey PRIMARY KEY (id); - - --- --- Name: domain_inkbunny_tags domain_inkbunny_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_tags - ADD CONSTRAINT domain_inkbunny_tags_pkey PRIMARY KEY (id); - - --- --- Name: domain_inkbunny_users domain_inkbunny_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_users - ADD CONSTRAINT domain_inkbunny_users_pkey PRIMARY KEY (id); - - -- -- Name: domain_post_file_bit_fingerprints domain_post_file_bit_fingerprints_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -4130,20 +3271,6 @@ ALTER TABLE ONLY public.users SET default_tablespace = mirai; --- --- Name: domain_fa_users_name_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX domain_fa_users_name_idx ON public.domain_fa_users USING gist (name public.gist_trgm_ops); - - --- --- Name: domain_fa_users_url_name_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX domain_fa_users_url_name_idx ON public.domain_fa_users USING gist (url_name public.gist_trgm_ops); - - -- -- Name: idx_domain_e621_posts_on_e621_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai -- @@ -4339,536 +3466,454 @@ CREATE UNIQUE INDEX idx_on_post_file_id_thumbnail_id_28e9a641fb ON public.domain CREATE UNIQUE INDEX index_blob_files_on_sha256 ON ONLY public.blob_files USING btree (sha256); -SET default_tablespace = mirai; - -- --- Name: index_blob_files_00_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_00_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_00_on_sha256 ON public.blob_files_00 USING btree (sha256); -- --- Name: index_blob_files_01_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_01_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_01_on_sha256 ON public.blob_files_01 USING btree (sha256); -- --- Name: index_blob_files_02_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_02_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_02_on_sha256 ON public.blob_files_02 USING btree (sha256); -- --- Name: index_blob_files_03_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_03_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_03_on_sha256 ON public.blob_files_03 USING btree (sha256); -- --- Name: index_blob_files_04_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_04_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_04_on_sha256 ON public.blob_files_04 USING btree (sha256); -- --- Name: index_blob_files_05_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_05_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_05_on_sha256 ON public.blob_files_05 USING btree (sha256); -- --- Name: index_blob_files_06_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_06_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_06_on_sha256 ON public.blob_files_06 USING btree (sha256); -- --- Name: index_blob_files_07_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_07_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_07_on_sha256 ON public.blob_files_07 USING btree (sha256); -- --- Name: index_blob_files_08_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_08_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_08_on_sha256 ON public.blob_files_08 USING btree (sha256); -- --- Name: index_blob_files_09_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_09_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_09_on_sha256 ON public.blob_files_09 USING btree (sha256); -- --- Name: index_blob_files_10_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_10_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_10_on_sha256 ON public.blob_files_10 USING btree (sha256); -- --- Name: index_blob_files_11_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_11_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_11_on_sha256 ON public.blob_files_11 USING btree (sha256); -- --- Name: index_blob_files_12_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_12_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_12_on_sha256 ON public.blob_files_12 USING btree (sha256); -- --- Name: index_blob_files_13_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_13_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_13_on_sha256 ON public.blob_files_13 USING btree (sha256); -- --- Name: index_blob_files_14_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_14_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_14_on_sha256 ON public.blob_files_14 USING btree (sha256); -- --- Name: index_blob_files_15_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_15_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_15_on_sha256 ON public.blob_files_15 USING btree (sha256); -- --- Name: index_blob_files_16_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_16_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_16_on_sha256 ON public.blob_files_16 USING btree (sha256); -- --- Name: index_blob_files_17_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_17_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_17_on_sha256 ON public.blob_files_17 USING btree (sha256); -- --- Name: index_blob_files_18_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_18_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_18_on_sha256 ON public.blob_files_18 USING btree (sha256); -- --- Name: index_blob_files_19_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_19_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_19_on_sha256 ON public.blob_files_19 USING btree (sha256); -- --- Name: index_blob_files_20_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_20_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_20_on_sha256 ON public.blob_files_20 USING btree (sha256); -- --- Name: index_blob_files_21_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_21_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_21_on_sha256 ON public.blob_files_21 USING btree (sha256); -- --- Name: index_blob_files_22_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_22_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_22_on_sha256 ON public.blob_files_22 USING btree (sha256); -- --- Name: index_blob_files_23_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_23_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_23_on_sha256 ON public.blob_files_23 USING btree (sha256); -- --- Name: index_blob_files_24_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_24_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_24_on_sha256 ON public.blob_files_24 USING btree (sha256); -- --- Name: index_blob_files_25_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_25_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_25_on_sha256 ON public.blob_files_25 USING btree (sha256); -- --- Name: index_blob_files_26_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_26_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_26_on_sha256 ON public.blob_files_26 USING btree (sha256); -- --- Name: index_blob_files_27_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_27_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_27_on_sha256 ON public.blob_files_27 USING btree (sha256); -- --- Name: index_blob_files_28_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_28_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_28_on_sha256 ON public.blob_files_28 USING btree (sha256); -- --- Name: index_blob_files_29_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_29_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_29_on_sha256 ON public.blob_files_29 USING btree (sha256); -- --- Name: index_blob_files_30_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_30_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_30_on_sha256 ON public.blob_files_30 USING btree (sha256); -- --- Name: index_blob_files_31_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_31_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_31_on_sha256 ON public.blob_files_31 USING btree (sha256); -- --- Name: index_blob_files_32_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_32_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_32_on_sha256 ON public.blob_files_32 USING btree (sha256); -- --- Name: index_blob_files_33_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_33_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_33_on_sha256 ON public.blob_files_33 USING btree (sha256); -- --- Name: index_blob_files_34_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_34_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_34_on_sha256 ON public.blob_files_34 USING btree (sha256); -- --- Name: index_blob_files_35_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_35_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_35_on_sha256 ON public.blob_files_35 USING btree (sha256); -- --- Name: index_blob_files_36_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_36_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_36_on_sha256 ON public.blob_files_36 USING btree (sha256); -- --- Name: index_blob_files_37_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_37_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_37_on_sha256 ON public.blob_files_37 USING btree (sha256); -- --- Name: index_blob_files_38_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_38_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_38_on_sha256 ON public.blob_files_38 USING btree (sha256); -- --- Name: index_blob_files_39_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_39_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_39_on_sha256 ON public.blob_files_39 USING btree (sha256); -- --- Name: index_blob_files_40_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_40_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_40_on_sha256 ON public.blob_files_40 USING btree (sha256); -- --- Name: index_blob_files_41_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_41_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_41_on_sha256 ON public.blob_files_41 USING btree (sha256); -- --- Name: index_blob_files_42_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_42_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_42_on_sha256 ON public.blob_files_42 USING btree (sha256); -- --- Name: index_blob_files_43_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_43_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_43_on_sha256 ON public.blob_files_43 USING btree (sha256); -- --- Name: index_blob_files_44_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_44_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_44_on_sha256 ON public.blob_files_44 USING btree (sha256); -- --- Name: index_blob_files_45_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_45_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_45_on_sha256 ON public.blob_files_45 USING btree (sha256); -- --- Name: index_blob_files_46_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_46_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_46_on_sha256 ON public.blob_files_46 USING btree (sha256); -- --- Name: index_blob_files_47_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_47_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_47_on_sha256 ON public.blob_files_47 USING btree (sha256); -- --- Name: index_blob_files_48_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_48_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_48_on_sha256 ON public.blob_files_48 USING btree (sha256); -- --- Name: index_blob_files_49_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_49_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_49_on_sha256 ON public.blob_files_49 USING btree (sha256); -- --- Name: index_blob_files_50_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_50_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_50_on_sha256 ON public.blob_files_50 USING btree (sha256); -- --- Name: index_blob_files_51_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_51_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_51_on_sha256 ON public.blob_files_51 USING btree (sha256); -- --- Name: index_blob_files_52_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_52_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_52_on_sha256 ON public.blob_files_52 USING btree (sha256); -- --- Name: index_blob_files_53_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_53_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_53_on_sha256 ON public.blob_files_53 USING btree (sha256); -- --- Name: index_blob_files_54_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_54_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_54_on_sha256 ON public.blob_files_54 USING btree (sha256); -- --- Name: index_blob_files_55_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_55_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_55_on_sha256 ON public.blob_files_55 USING btree (sha256); -- --- Name: index_blob_files_56_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_56_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_56_on_sha256 ON public.blob_files_56 USING btree (sha256); -- --- Name: index_blob_files_57_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_57_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_57_on_sha256 ON public.blob_files_57 USING btree (sha256); -- --- Name: index_blob_files_58_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_58_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_58_on_sha256 ON public.blob_files_58 USING btree (sha256); -- --- Name: index_blob_files_59_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_59_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_59_on_sha256 ON public.blob_files_59 USING btree (sha256); -- --- Name: index_blob_files_60_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_60_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_60_on_sha256 ON public.blob_files_60 USING btree (sha256); -- --- Name: index_blob_files_61_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_61_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_61_on_sha256 ON public.blob_files_61 USING btree (sha256); -- --- Name: index_blob_files_62_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_62_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_62_on_sha256 ON public.blob_files_62 USING btree (sha256); -- --- Name: index_blob_files_63_on_sha256; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai +-- Name: index_blob_files_63_on_sha256; Type: INDEX; Schema: public; Owner: - -- CREATE UNIQUE INDEX index_blob_files_63_on_sha256 ON public.blob_files_63 USING btree (sha256); --- --- Name: index_domain_e621_favs_on_post_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_e621_favs_on_post_id ON public.domain_e621_favs USING btree (post_id); - - --- --- Name: index_domain_e621_favs_on_user_id_and_post_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_domain_e621_favs_on_user_id_and_post_id ON public.domain_e621_favs USING btree (user_id, post_id); - - --- --- Name: index_domain_e621_posts_on_e621_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_domain_e621_posts_on_e621_id ON public.domain_e621_posts USING btree (e621_id); - - --- --- Name: index_domain_e621_posts_on_file_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_e621_posts_on_file_id ON public.domain_e621_posts USING btree (file_id); - - -SET default_tablespace = ''; - --- --- Name: index_domain_e621_posts_on_md5; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_e621_posts_on_md5 ON public.domain_e621_posts USING btree (md5); - - -SET default_tablespace = mirai; - --- --- Name: index_domain_e621_posts_on_parent_e621_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_e621_posts_on_parent_e621_id ON public.domain_e621_posts USING btree (parent_e621_id); - - -SET default_tablespace = ''; - --- --- Name: index_domain_e621_taggings_on_post_id_and_tag_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE UNIQUE INDEX index_domain_e621_taggings_on_post_id_and_tag_id ON public.domain_e621_taggings USING btree (post_id, tag_id); - - -SET default_tablespace = mirai; - --- --- Name: index_domain_e621_tags_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_domain_e621_tags_on_name ON public.domain_e621_tags USING btree (name); - - --- --- Name: index_domain_e621_users_on_e621_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_domain_e621_users_on_e621_user_id ON public.domain_e621_users USING btree (e621_user_id); - - -SET default_tablespace = ''; - --- --- Name: index_domain_e621_users_on_json_attributes; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_e621_users_on_json_attributes ON public.domain_e621_users USING gin (json_attributes); - - SET default_tablespace = mirai; -- @@ -4892,257 +3937,8 @@ CREATE INDEX index_domain_fa_fav_id_and_dates_on_user_id ON public.domain_fa_fav CREATE UNIQUE INDEX index_domain_fa_fav_id_and_dates_on_user_id_and_post_fa_id ON public.domain_fa_fav_id_and_dates USING btree (user_id, post_fa_id); --- --- Name: index_domain_fa_favs_on_post_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_fa_favs_on_post_id ON public.domain_fa_favs USING btree (post_id) WITH (deduplicate_items='true'); - - --- --- Name: index_domain_fa_favs_on_user_id_and_post_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_domain_fa_favs_on_user_id_and_post_id ON public.domain_fa_favs USING btree (user_id, post_id); - - --- --- Name: index_domain_fa_follows_on_followed_id_and_follower_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_fa_follows_on_followed_id_and_follower_id ON public.domain_fa_follows USING btree (followed_id, follower_id); - - --- --- Name: index_domain_fa_follows_on_follower_id_and_followed_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_domain_fa_follows_on_follower_id_and_followed_id ON public.domain_fa_follows USING btree (follower_id, followed_id); - - --- --- Name: index_domain_fa_post_factors_on_for_favorite; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_fa_post_factors_on_for_favorite ON public.domain_fa_post_factors USING ivfflat (for_favorite public.vector_cosine_ops) WITH (lists='5000'); - - --- --- Name: index_domain_fa_post_factors_on_post_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -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_user_avatar_versions_on_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_fa_user_avatar_versions_on_item_id ON public.domain_fa_user_avatar_versions USING btree (item_id); - - --- --- Name: index_domain_fa_user_avatars_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_domain_fa_user_avatars_on_user_id ON public.domain_fa_user_avatars USING btree (user_id); - - --- --- Name: index_domain_fa_user_factors_on_for_followed; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_fa_user_factors_on_for_followed ON public.domain_fa_user_factors USING ivfflat (for_followed); - - --- --- Name: index_domain_fa_user_factors_on_for_follower; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_fa_user_factors_on_for_follower ON public.domain_fa_user_factors USING ivfflat (for_follower); - - --- --- Name: index_domain_fa_user_factors_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_domain_fa_user_factors_on_user_id ON public.domain_fa_user_factors USING btree (user_id); - - --- --- Name: index_domain_fa_users_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_domain_fa_users_on_name ON public.domain_fa_users USING btree (name); - - --- --- Name: index_domain_fa_users_on_url_name; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_domain_fa_users_on_url_name ON public.domain_fa_users USING btree (url_name); - - SET default_tablespace = ''; --- --- Name: index_domain_inkbunny_favs_on_post_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_favs_on_post_id ON public.domain_inkbunny_favs USING btree (post_id); - - --- --- Name: index_domain_inkbunny_favs_on_post_id_and_user_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_favs_on_post_id_and_user_id ON public.domain_inkbunny_favs USING btree (post_id, user_id); - - --- --- Name: index_domain_inkbunny_favs_on_user_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_favs_on_user_id ON public.domain_inkbunny_favs USING btree (user_id); - - --- --- Name: index_domain_inkbunny_favs_on_user_id_and_post_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE UNIQUE INDEX index_domain_inkbunny_favs_on_user_id_and_post_id ON public.domain_inkbunny_favs USING btree (user_id, post_id); - - --- --- Name: index_domain_inkbunny_files_on_post_id_and_file_order; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_files_on_post_id_and_file_order ON public.domain_inkbunny_files USING btree (post_id, file_order); - - --- --- Name: index_domain_inkbunny_follows_on_followed_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_follows_on_followed_id ON public.domain_inkbunny_follows USING btree (followed_id); - - --- --- Name: index_domain_inkbunny_follows_on_followed_id_and_follower_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_follows_on_followed_id_and_follower_id ON public.domain_inkbunny_follows USING btree (followed_id, follower_id); - - --- --- Name: index_domain_inkbunny_follows_on_follower_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_follows_on_follower_id ON public.domain_inkbunny_follows USING btree (follower_id); - - --- --- Name: index_domain_inkbunny_follows_on_follower_id_and_followed_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE UNIQUE INDEX index_domain_inkbunny_follows_on_follower_id_and_followed_id ON public.domain_inkbunny_follows USING btree (follower_id, followed_id); - - -SET default_tablespace = mirai; - --- --- Name: index_domain_inkbunny_pool_joins_on_left_post_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_inkbunny_pool_joins_on_left_post_id ON public.domain_inkbunny_pool_joins USING btree (left_post_id); - - --- --- Name: index_domain_inkbunny_pool_joins_on_pool_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_inkbunny_pool_joins_on_pool_id ON public.domain_inkbunny_pool_joins USING btree (pool_id); - - --- --- Name: index_domain_inkbunny_pool_joins_on_post_id_and_pool_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE UNIQUE INDEX index_domain_inkbunny_pool_joins_on_post_id_and_pool_id ON public.domain_inkbunny_pool_joins USING btree (post_id, pool_id); - - --- --- Name: index_domain_inkbunny_pool_joins_on_right_post_id; Type: INDEX; Schema: public; Owner: -; Tablespace: mirai --- - -CREATE INDEX index_domain_inkbunny_pool_joins_on_right_post_id ON public.domain_inkbunny_pool_joins USING btree (right_post_id); - - -SET default_tablespace = ''; - --- --- Name: index_domain_inkbunny_pools_on_deep_update_log_entry_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_pools_on_deep_update_log_entry_id ON public.domain_inkbunny_pools USING btree (deep_update_log_entry_id); - - --- --- Name: index_domain_inkbunny_pools_on_ib_pool_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE UNIQUE INDEX index_domain_inkbunny_pools_on_ib_pool_id ON public.domain_inkbunny_pools USING btree (ib_pool_id); - - --- --- Name: index_domain_inkbunny_posts_on_creator_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_posts_on_creator_id ON public.domain_inkbunny_posts USING btree (creator_id); - - --- --- Name: index_domain_inkbunny_posts_on_deep_update_log_entry_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_posts_on_deep_update_log_entry_id ON public.domain_inkbunny_posts USING btree (deep_update_log_entry_id); - - --- --- Name: index_domain_inkbunny_posts_on_ib_post_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE UNIQUE INDEX index_domain_inkbunny_posts_on_ib_post_id ON public.domain_inkbunny_posts USING btree (ib_post_id); - - --- --- Name: index_domain_inkbunny_posts_on_shallow_update_log_entry_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_posts_on_shallow_update_log_entry_id ON public.domain_inkbunny_posts USING btree (shallow_update_log_entry_id); - - --- --- Name: index_domain_inkbunny_users_on_deep_update_log_entry_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_users_on_deep_update_log_entry_id ON public.domain_inkbunny_users USING btree (deep_update_log_entry_id); - - --- --- Name: index_domain_inkbunny_users_on_ib_user_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE UNIQUE INDEX index_domain_inkbunny_users_on_ib_user_id ON public.domain_inkbunny_users USING btree (ib_user_id); - - --- --- Name: index_domain_inkbunny_users_on_shallow_update_log_entry_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_domain_inkbunny_users_on_shallow_update_log_entry_id ON public.domain_inkbunny_users USING btree (shallow_update_log_entry_id); - - -- -- Name: index_domain_post_file_bit_fingerprints_on_fingerprint_value; Type: INDEX; Schema: public; Owner: - -- @@ -5553,13 +4349,6 @@ CREATE INDEX index_domain_users_on_type ON public.domain_users USING btree (type SET default_tablespace = ''; --- --- Name: index_e621_posts_on_scanned_post_favs_at; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_e621_posts_on_scanned_post_favs_at ON public.domain_e621_posts USING btree (((json_attributes -> 'scanned_post_favs_at'::text))); - - -- -- Name: index_global_states_on_key; Type: INDEX; Schema: public; Owner: - -- @@ -6292,14 +5081,6 @@ ALTER TABLE ONLY public.domain_user_job_event_add_tracked_objects ADD CONSTRAINT fk_rails_03ea351597 FOREIGN KEY (user_id) REFERENCES public.domain_users(id); --- --- Name: domain_e621_favs fk_rails_0b7ec98aa2; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_e621_favs - ADD CONSTRAINT fk_rails_0b7ec98aa2 FOREIGN KEY (post_id) REFERENCES public.domain_e621_posts(id); - - -- -- Name: domain_users_fa_aux fk_rails_0d64d940cf; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6316,38 +5097,6 @@ ALTER TABLE ONLY public.domain_user_job_event_add_tracked_objects ADD CONSTRAINT fk_rails_0e1b667c4a FOREIGN KEY (log_entry_id) REFERENCES public.http_log_entries(id); --- --- Name: domain_e621_taggings fk_rails_13971d3fe6; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_e621_taggings - ADD CONSTRAINT fk_rails_13971d3fe6 FOREIGN KEY (tag_id) REFERENCES public.domain_e621_tags(id); - - --- --- Name: domain_e621_favs fk_rails_15538b2b65; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_e621_favs - ADD CONSTRAINT fk_rails_15538b2b65 FOREIGN KEY (user_id) REFERENCES public.domain_e621_users(id); - - --- --- Name: domain_inkbunny_pools fk_rails_1680d5932f; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_pools - ADD CONSTRAINT fk_rails_1680d5932f FOREIGN KEY (deep_update_log_entry_id) REFERENCES public.http_log_entries(id); - - --- --- Name: domain_fa_follows fk_rails_175679b7a2; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_follows - ADD CONSTRAINT fk_rails_175679b7a2 FOREIGN KEY (followed_id) REFERENCES public.domain_fa_users(id); - - -- -- Name: domain_users_inkbunny_aux fk_rails_205f95e7f6; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6364,14 +5113,6 @@ ALTER TABLE ONLY public.domain_post_group_joins ADD CONSTRAINT fk_rails_22154fb920 FOREIGN KEY (post_id) REFERENCES public.domain_posts(id); --- --- Name: domain_inkbunny_favs fk_rails_22732bb65a; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_favs - ADD CONSTRAINT fk_rails_22732bb65a FOREIGN KEY (post_id) REFERENCES public.domain_inkbunny_posts(id); - - -- -- Name: domain_twitter_medias fk_rails_278c1d09f0; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6380,14 +5121,6 @@ ALTER TABLE ONLY public.domain_twitter_medias ADD CONSTRAINT fk_rails_278c1d09f0 FOREIGN KEY (tweet_id) REFERENCES public.domain_twitter_tweets(id); --- --- Name: domain_fa_user_avatars fk_rails_2a03f31297; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_user_avatars - ADD CONSTRAINT fk_rails_2a03f31297 FOREIGN KEY (log_entry_id) REFERENCES public.http_log_entries(id); - - -- -- Name: domain_users_inkbunny_aux fk_rails_304ea0307f; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6396,22 +5129,6 @@ ALTER TABLE ONLY public.domain_users_inkbunny_aux ADD CONSTRAINT fk_rails_304ea0307f FOREIGN KEY (base_table_id) REFERENCES public.domain_users(id); --- --- Name: domain_inkbunny_files fk_rails_31a33e433e; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_files - ADD CONSTRAINT fk_rails_31a33e433e FOREIGN KEY (post_id) REFERENCES public.domain_inkbunny_posts(id); - - --- --- Name: domain_fa_user_factors fk_rails_3ff029c503; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_user_factors - ADD CONSTRAINT fk_rails_3ff029c503 FOREIGN KEY (user_id) REFERENCES public.domain_fa_users(id); - - -- -- Name: http_log_entries fk_rails_42f35e9da0; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6436,30 +5153,6 @@ ALTER TABLE ONLY public.domain_user_user_follows ADD CONSTRAINT fk_rails_4b2ab65400 FOREIGN KEY (from_id) REFERENCES public.domain_users(id); --- --- Name: domain_fa_favs fk_rails_503a610bac; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_favs - ADD CONSTRAINT fk_rails_503a610bac FOREIGN KEY (user_id) REFERENCES public.domain_fa_users(id); - - --- --- Name: domain_inkbunny_users fk_rails_52a14c94c6; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_users - ADD CONSTRAINT fk_rails_52a14c94c6 FOREIGN KEY (shallow_update_log_entry_id) REFERENCES public.http_log_entries(id); - - --- --- Name: domain_fa_user_avatars fk_rails_559463d6ea; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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_twitter_medias fk_rails_5fffa41fa6; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6468,14 +5161,6 @@ ALTER TABLE ONLY public.domain_twitter_medias ADD CONSTRAINT fk_rails_5fffa41fa6 FOREIGN KEY (file_id) REFERENCES public.http_log_entries(id); --- --- Name: domain_inkbunny_favs fk_rails_61d7d623d3; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_favs - ADD CONSTRAINT fk_rails_61d7d623d3 FOREIGN KEY (user_id) REFERENCES public.domain_inkbunny_users(id); - - -- -- Name: domain_user_user_follow_to_factors fk_rails_75a659b96f; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6484,14 +5169,6 @@ ALTER TABLE ONLY public.domain_user_user_follow_to_factors ADD CONSTRAINT fk_rails_75a659b96f FOREIGN KEY (user_id) REFERENCES public.domain_users(id); --- --- Name: domain_fa_user_avatar_versions fk_rails_77fefb9ac3; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_user_avatar_versions - ADD CONSTRAINT fk_rails_77fefb9ac3 FOREIGN KEY (item_id) REFERENCES public.domain_fa_user_avatars(id); - - -- -- Name: domain_users_fa_aux fk_rails_7e51f8bfbc; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6508,14 +5185,6 @@ ALTER TABLE ONLY public.domain_post_files ADD CONSTRAINT fk_rails_7eb6ae5fa3 FOREIGN KEY (post_id) REFERENCES public.domain_posts(id); --- --- Name: domain_inkbunny_posts fk_rails_82ffd77f0c; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_posts - ADD CONSTRAINT fk_rails_82ffd77f0c FOREIGN KEY (shallow_update_log_entry_id) REFERENCES public.http_log_entries(id); - - -- -- Name: domain_user_user_follow_from_factors fk_rails_83aa0dfb3a; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6532,22 +5201,6 @@ ALTER TABLE ONLY public.domain_user_search_names ADD CONSTRAINT fk_rails_8475fe75b5 FOREIGN KEY (user_id) REFERENCES public.domain_users(id); --- --- Name: domain_fa_follows fk_rails_87bfff6dba; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_fa_follows - ADD CONSTRAINT fk_rails_87bfff6dba FOREIGN KEY (follower_id) REFERENCES public.domain_fa_users(id); - - --- --- Name: domain_inkbunny_posts fk_rails_91015c8e4f; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_posts - ADD CONSTRAINT fk_rails_91015c8e4f FOREIGN KEY (creator_id) REFERENCES public.domain_inkbunny_users(id); - - -- -- Name: good_job_execution_log_lines_collections fk_rails_98c288034f; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6612,22 +5265,6 @@ ALTER TABLE ONLY public.domain_users_inkbunny_aux ADD CONSTRAINT fk_rails_c2d597dcc4 FOREIGN KEY (deep_update_log_entry_id) REFERENCES public.http_log_entries(id); --- --- Name: domain_inkbunny_posts fk_rails_c2d9f4b382; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_posts - ADD CONSTRAINT fk_rails_c2d9f4b382 FOREIGN KEY (deep_update_log_entry_id) REFERENCES public.http_log_entries(id); - - --- --- Name: domain_inkbunny_files fk_rails_c4b834829e; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_files - ADD CONSTRAINT fk_rails_c4b834829e FOREIGN KEY (log_entry_id) REFERENCES public.http_log_entries(id); - - -- -- Name: http_log_entries fk_rails_c5f7bcff78; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6676,30 +5313,6 @@ ALTER TABLE ONLY public.domain_post_files ADD CONSTRAINT fk_rails_d059c07f77 FOREIGN KEY (log_entry_id) REFERENCES public.http_log_entries(id); --- --- Name: domain_inkbunny_users fk_rails_d6ea75e723; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_users - ADD CONSTRAINT fk_rails_d6ea75e723 FOREIGN KEY (deep_update_log_entry_id) REFERENCES public.http_log_entries(id); - - --- --- Name: domain_e621_taggings fk_rails_da3a488297; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_e621_taggings - ADD CONSTRAINT fk_rails_da3a488297 FOREIGN KEY (post_id) REFERENCES public.domain_e621_posts(id); - - --- --- Name: domain_inkbunny_follows fk_rails_dffb743e89; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_follows - ADD CONSTRAINT fk_rails_dffb743e89 FOREIGN KEY (followed_id) REFERENCES public.domain_inkbunny_users(id); - - -- -- Name: domain_post_group_joins fk_rails_eddd0a9390; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6708,14 +5321,6 @@ ALTER TABLE ONLY public.domain_post_group_joins ADD CONSTRAINT fk_rails_eddd0a9390 FOREIGN KEY (group_id) REFERENCES public.domain_post_groups(id); --- --- Name: domain_inkbunny_follows fk_rails_ee473fedf4; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.domain_inkbunny_follows - ADD CONSTRAINT fk_rails_ee473fedf4 FOREIGN KEY (follower_id) REFERENCES public.domain_inkbunny_users(id); - - -- -- Name: domain_user_post_creations fk_rails_f3c2231511; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -6747,6 +5352,10 @@ ALTER TABLE ONLY public.domain_twitter_tweets SET search_path TO "$user", public; INSERT INTO "schema_migrations" (version) VALUES +('20250722013801'), +('20250722010822'), +('20250722010327'), +('20250722005802'), ('20250722005417'), ('20250722005329'), ('20250722004928'), diff --git a/justfile b/justfile index 1d409bf9..edc61a56 100644 --- a/justfile +++ b/justfile @@ -13,9 +13,6 @@ format-changed: format-all: find . -name '*.rb' -type f -exec sh -c 'stree format "$1" > "$1.tmp" && mv "$1.tmp" "$1"' sh {} \; -psql-dump-domain-fa-favs: - @psql -P pager=off -c 'select user_id, post_id, 1 from domain_fa_favs limit 10000000;' -d redux_prod -h 10.166.33.171 -U scraper_redux -t -A -F ' ' - test: bundle exec srb tc rm -rf tmp/blob_files_test/thumbnails