forked from e621ng/e621ng
[Cleanup] Remove unused gems and tables/columns
This commit is contained in:
parent
1b2ebaa856
commit
3de690961d
11
Gemfile
11
Gemfile
@ -6,32 +6,22 @@ gem "rails", "~> 6.1"
|
||||
gem "pg"
|
||||
gem "dalli", :platforms => :ruby
|
||||
gem "simple_form"
|
||||
gem "mechanize"
|
||||
gem 'active_model_serializers', '~> 0.10.0'
|
||||
gem "whenever", :require => false
|
||||
gem "sanitize"
|
||||
gem 'ruby-vips'
|
||||
gem 'net-sftp'
|
||||
gem 'diff-lcs', :require => "diff/lcs/array"
|
||||
gem 'bcrypt', :require => "bcrypt"
|
||||
gem 'draper'
|
||||
gem 'statistics2'
|
||||
gem 'radix62', '~> 1.0.1'
|
||||
gem 'streamio-ffmpeg'
|
||||
gem 'rubyzip', :require => "zip"
|
||||
gem 'twitter'
|
||||
gem 'responders'
|
||||
gem 'dtext_rb', :git => "https://github.com/zwagoth/dtext_rb.git", branch: "master", :require => "dtext"
|
||||
gem 'cityhash'
|
||||
gem 'memoist'
|
||||
gem 'daemons'
|
||||
gem 'oauth2'
|
||||
gem 'bootsnap'
|
||||
gem 'addressable'
|
||||
gem 'httparty'
|
||||
gem 'rakismet'
|
||||
gem 'recaptcha', require: "recaptcha/rails"
|
||||
gem 'ptools'
|
||||
gem 'jquery-rails'
|
||||
gem 'webpacker', '>= 4.0.x'
|
||||
gem 'retriable'
|
||||
@ -47,6 +37,7 @@ gem 'elasticsearch-model'
|
||||
gem 'elasticsearch-rails'
|
||||
|
||||
gem 'mailgun-ruby'
|
||||
gem 'resolv'
|
||||
|
||||
# needed for looser jpeg header compat
|
||||
gem 'ruby-imagespec', :require => "image_spec", :git => "https://github.com/r888888888/ruby-imagespec.git", :branch => "exif-fixes"
|
||||
|
86
Gemfile.lock
86
Gemfile.lock
@ -93,7 +93,6 @@ GEM
|
||||
brpoplpush-redis_script (0.1.2)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.5)
|
||||
redis (>= 1.0, <= 5.0)
|
||||
buftok (0.2.0)
|
||||
builder (3.2.4)
|
||||
byebug (11.1.3)
|
||||
case_transform (0.2)
|
||||
@ -106,7 +105,6 @@ GEM
|
||||
crack (0.4.5)
|
||||
rexml
|
||||
crass (1.0.6)
|
||||
daemons (1.4.1)
|
||||
dalli (3.1.5)
|
||||
diff-lcs (1.5.0)
|
||||
docile (1.4.0)
|
||||
@ -136,7 +134,6 @@ GEM
|
||||
elasticsearch-transport (7.16.1)
|
||||
faraday (~> 1)
|
||||
multi_json
|
||||
equalizer (0.0.11)
|
||||
erubi (1.10.0)
|
||||
factory_bot (6.2.0)
|
||||
activesupport (>= 5.0.0)
|
||||
@ -162,29 +159,15 @@ GEM
|
||||
ffaker (2.20.0)
|
||||
ffi (1.15.4)
|
||||
ffi (1.15.4-x64-mingw32)
|
||||
ffi-compiler (1.0.1)
|
||||
ffi (>= 1.0.0)
|
||||
rake
|
||||
ffi-win32-extensions (1.0.4)
|
||||
ffi
|
||||
get_process_mem (0.2.7)
|
||||
ffi (~> 1.0)
|
||||
globalid (1.0.0)
|
||||
activesupport (>= 5.0)
|
||||
hashdiff (1.0.1)
|
||||
hashie (5.0.0)
|
||||
http (4.4.1)
|
||||
addressable (~> 2.3)
|
||||
http-cookie (~> 1.0)
|
||||
http-form_data (~> 2.2)
|
||||
http-parser (~> 1.2.0)
|
||||
http-accept (1.7.0)
|
||||
http-cookie (1.0.4)
|
||||
domain_name (~> 0.5)
|
||||
http-form_data (2.3.0)
|
||||
http-parser (1.2.3)
|
||||
ffi-compiler (>= 1.0, < 2.0)
|
||||
http_parser.rb (0.6.0)
|
||||
httparty (0.20.0)
|
||||
mime-types (~> 3.0)
|
||||
multi_xml (>= 0.5.2)
|
||||
@ -196,7 +179,6 @@ GEM
|
||||
thor (>= 0.14, < 2.0)
|
||||
json (2.6.1)
|
||||
jsonapi-renderer (0.2.2)
|
||||
jwt (2.3.0)
|
||||
kgio (2.11.4)
|
||||
listen (3.7.0)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
@ -209,20 +191,7 @@ GEM
|
||||
mailgun-ruby (1.2.5)
|
||||
rest-client (>= 2.0.2)
|
||||
marcel (1.0.2)
|
||||
mechanize (2.8.3)
|
||||
addressable (~> 2.8)
|
||||
domain_name (~> 0.5, >= 0.5.20190701)
|
||||
http-cookie (~> 1.0, >= 1.0.3)
|
||||
mime-types (~> 3.0)
|
||||
net-http-digest_auth (~> 1.4, >= 1.4.1)
|
||||
net-http-persistent (>= 2.5.2, < 5.0.dev)
|
||||
nokogiri (~> 1.11, >= 1.11.2)
|
||||
rubyntlm (~> 0.6, >= 0.6.3)
|
||||
webrick (~> 1.7)
|
||||
webrobots (~> 0.1.2)
|
||||
memoist (0.16.2)
|
||||
memoizable (0.4.2)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
method_source (1.0.0)
|
||||
mime-types (3.4.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
@ -241,13 +210,6 @@ GEM
|
||||
multipart-post (2.1.1)
|
||||
mustermann (1.1.1)
|
||||
ruby2_keywords (~> 0.0.1)
|
||||
naught (1.1.0)
|
||||
net-http-digest_auth (1.4.1)
|
||||
net-http-persistent (4.0.1)
|
||||
connection_pool (~> 2.2)
|
||||
net-sftp (3.0.0)
|
||||
net-ssh (>= 5.0.0, < 7.0.0)
|
||||
net-ssh (6.1.0)
|
||||
netrc (0.11.0)
|
||||
newrelic_rpm (8.2.0)
|
||||
nio4r (2.5.8)
|
||||
@ -256,12 +218,6 @@ GEM
|
||||
racc (~> 1.4)
|
||||
nokogiri (1.13.3-x64-mingw32)
|
||||
racc (~> 1.4)
|
||||
oauth2 (1.4.7)
|
||||
faraday (>= 0.8, < 2.0)
|
||||
jwt (>= 1.0, < 3.0)
|
||||
multi_json (~> 1.3)
|
||||
multi_xml (~> 0.5)
|
||||
rack (>= 1.2, < 3)
|
||||
pg (1.2.3)
|
||||
pg (1.2.3-x64-mingw32)
|
||||
pry (0.13.1)
|
||||
@ -270,9 +226,6 @@ GEM
|
||||
pry-byebug (3.9.0)
|
||||
byebug (~> 11.0)
|
||||
pry (~> 0.13.0)
|
||||
ptools (1.4.2)
|
||||
ptools (1.4.2-universal-mingw32)
|
||||
win32-file
|
||||
public_suffix (4.0.6)
|
||||
racc (1.6.0)
|
||||
rack (2.2.3)
|
||||
@ -282,7 +235,6 @@ GEM
|
||||
rack
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
radix62 (1.0.1)
|
||||
rails (6.1.4.6)
|
||||
actioncable (= 6.1.4.6)
|
||||
actionmailbox (= 6.1.4.6)
|
||||
@ -311,7 +263,6 @@ GEM
|
||||
thor (~> 1.0)
|
||||
raindrops (0.20.0)
|
||||
rake (13.0.6)
|
||||
rakismet (1.5.4)
|
||||
rb-fsevent (0.11.0)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
@ -320,6 +271,7 @@ GEM
|
||||
redis (4.6.0)
|
||||
request_store (1.5.0)
|
||||
rack (>= 1.4)
|
||||
resolv (0.2.1)
|
||||
responders (3.0.1)
|
||||
actionpack (>= 5.0)
|
||||
railties (>= 5.0)
|
||||
@ -339,8 +291,6 @@ GEM
|
||||
ruby-vips (2.1.4)
|
||||
ffi (~> 1.12)
|
||||
ruby2_keywords (0.0.5)
|
||||
rubyntlm (0.6.3)
|
||||
rubyzip (2.3.2)
|
||||
sanitize (6.0.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.12.0)
|
||||
@ -360,7 +310,6 @@ GEM
|
||||
simple_form (5.1.0)
|
||||
actionpack (>= 5.2)
|
||||
activemodel (>= 5.2)
|
||||
simple_oauth (0.3.1)
|
||||
simplecov (0.21.2)
|
||||
docile (~> 1.1)
|
||||
simplecov-html (~> 0.11)
|
||||
@ -379,24 +328,11 @@ GEM
|
||||
actionpack (>= 5.2)
|
||||
activesupport (>= 5.2)
|
||||
sprockets (>= 3.0.0)
|
||||
statistics2 (0.54)
|
||||
streamio-ffmpeg (3.0.2)
|
||||
multi_json (~> 1.8)
|
||||
thor (1.2.1)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.10)
|
||||
timecop (0.9.4)
|
||||
twitter (7.0.0)
|
||||
addressable (~> 2.3)
|
||||
buftok (~> 0.2.0)
|
||||
equalizer (~> 0.0.11)
|
||||
http (~> 4.0)
|
||||
http-form_data (~> 2.0)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
memoizable (~> 0.4.0)
|
||||
multipart-post (~> 2.0)
|
||||
naught (~> 1.0)
|
||||
simple_oauth (~> 0.3.0)
|
||||
tzinfo (2.0.4)
|
||||
concurrent-ruby (~> 1.0)
|
||||
unf (0.1.4)
|
||||
@ -418,20 +354,11 @@ GEM
|
||||
rack-proxy (>= 0.6.1)
|
||||
railties (>= 5.2)
|
||||
semantic_range (>= 2.3.0)
|
||||
webrick (1.7.0)
|
||||
webrobots (0.1.2)
|
||||
websocket-driver (0.7.5)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.5)
|
||||
whenever (1.0.0)
|
||||
chronic (>= 0.6.3)
|
||||
win32-file (0.8.2)
|
||||
ffi
|
||||
ffi-win32-extensions
|
||||
win32-file-stat (>= 1.4.0)
|
||||
win32-file-stat (1.5.5)
|
||||
ffi
|
||||
ffi-win32-extensions
|
||||
zeitwerk (2.5.4)
|
||||
|
||||
PLATFORMS
|
||||
@ -445,7 +372,6 @@ DEPENDENCIES
|
||||
bcrypt
|
||||
bootsnap
|
||||
cityhash
|
||||
daemons
|
||||
dalli
|
||||
diff-lcs
|
||||
dotenv-rails
|
||||
@ -460,28 +386,22 @@ DEPENDENCIES
|
||||
listen
|
||||
mailgun-ruby
|
||||
marcel
|
||||
mechanize
|
||||
memoist
|
||||
minitest-ci
|
||||
mocha
|
||||
mock_redis
|
||||
net-sftp
|
||||
newrelic_rpm
|
||||
oauth2
|
||||
pg
|
||||
pry-byebug
|
||||
ptools
|
||||
radix62 (~> 1.0.1)
|
||||
rails (~> 6.1)
|
||||
rakismet
|
||||
recaptcha
|
||||
redis
|
||||
request_store
|
||||
resolv
|
||||
responders
|
||||
retriable
|
||||
ruby-imagespec!
|
||||
ruby-vips
|
||||
rubyzip
|
||||
sanitize
|
||||
shoulda-context
|
||||
shoulda-matchers
|
||||
@ -490,10 +410,8 @@ DEPENDENCIES
|
||||
simple_form
|
||||
simplecov
|
||||
sinatra
|
||||
statistics2
|
||||
streamio-ffmpeg
|
||||
timecop
|
||||
twitter
|
||||
unicorn
|
||||
unicorn-worker-killer
|
||||
webmock
|
||||
|
@ -1,64 +0,0 @@
|
||||
require 'mechanize'
|
||||
|
||||
if Rails.env.test?
|
||||
# something about the root certs on the travis ci image causes Mechanize
|
||||
# to intermittently fail. this is a monkey patch to reset the connection
|
||||
# after every request to avoid dealing wtiht he issue.
|
||||
#
|
||||
# from http://scottwb.com/blog/2013/11/09/defeating-the-infamous-mechanize-too-many-connection-resets-bug/
|
||||
class Mechanize::HTTP::Agent
|
||||
MAX_RESET_RETRIES = 10
|
||||
|
||||
# We need to replace the core Mechanize HTTP method:
|
||||
#
|
||||
# Mechanize::HTTP::Agent#fetch
|
||||
#
|
||||
# with a wrapper that handles the infamous "too many connection resets"
|
||||
# Mechanize bug that is described here:
|
||||
#
|
||||
# https://github.com/sparklemotion/mechanize/issues/123
|
||||
#
|
||||
# The wrapper shuts down the persistent HTTP connection when it fails with
|
||||
# this error, and simply tries again. In practice, this only ever needs to
|
||||
# be retried once, but I am going to let it retry a few times
|
||||
# (MAX_RESET_RETRIES), just in case.
|
||||
#
|
||||
def fetch_with_retry(
|
||||
uri,
|
||||
method = :get,
|
||||
headers = {},
|
||||
params = [],
|
||||
referer = current_page,
|
||||
redirects = 0
|
||||
)
|
||||
action = "#{method.to_s.upcase} #{uri.to_s}"
|
||||
retry_count = 0
|
||||
|
||||
begin
|
||||
fetch_without_retry(uri, method, headers, params, referer, redirects)
|
||||
rescue Net::HTTP::Persistent::Error => e
|
||||
# Pass on any other type of error.
|
||||
raise unless e.message =~ /too many connection resets/
|
||||
|
||||
# Pass on the error if we've tried too many times.
|
||||
if retry_count >= MAX_RESET_RETRIES
|
||||
print "R"
|
||||
#puts "**** WARN: Mechanize retried connection reset #{MAX_RESET_RETRIES} times and never succeeded: #{action}"
|
||||
raise
|
||||
end
|
||||
|
||||
# Otherwise, shutdown the persistent HTTP connection and try again.
|
||||
print "R"
|
||||
#puts "**** WARN: Mechanize retrying connection reset error: #{action}"
|
||||
retry_count += 1
|
||||
self.http.shutdown
|
||||
retry
|
||||
end
|
||||
end
|
||||
|
||||
# Alias so #fetch actually uses our new #fetch_with_retry to wrap the
|
||||
# old one aliased as #fetch_without_retry.
|
||||
alias_method :fetch_without_retry, :fetch
|
||||
alias_method :fetch, :fetch_with_retry
|
||||
end
|
||||
end
|
26
db/migrate/20220316162257_remove_dead_tables_and_columns.rb
Normal file
26
db/migrate/20220316162257_remove_dead_tables_and_columns.rb
Normal file
@ -0,0 +1,26 @@
|
||||
class RemoveDeadTablesAndColumns < ActiveRecord::Migration[6.1]
|
||||
def up
|
||||
User.without_timeout do
|
||||
drop_table :post_appeals
|
||||
drop_table :favorite_groups
|
||||
drop_table :post_image_hashes
|
||||
drop_table :post_replacements
|
||||
drop_table :saved_searches
|
||||
drop_table :user_blacklisted_tags
|
||||
drop_table :post_updates
|
||||
drop_table :pixiv_ugoira_frame_data
|
||||
remove_column :artists, :is_banned
|
||||
remove_column :artist_versions, :is_banned
|
||||
remove_column :forum_topics, :min_level
|
||||
remove_column :dmails, :is_spam
|
||||
remove_column :posts, :pixiv_id
|
||||
remove_column :uploads, :referer_url
|
||||
remove_column :uploads, :context
|
||||
remove_column :uploads, :content_type
|
||||
remove_column :uploads, :file_path
|
||||
remove_column :uploads, :server
|
||||
change_column_null :users, :profile_about, false
|
||||
change_column_null :users, :profile_artinfo, false
|
||||
end
|
||||
end
|
||||
end
|
473
db/structure.sql
473
db/structure.sql
@ -222,7 +222,6 @@ CREATE TABLE public.artist_versions (
|
||||
updater_ip_addr inet NOT NULL,
|
||||
is_active boolean DEFAULT true NOT NULL,
|
||||
group_name character varying DEFAULT ''::character varying NOT NULL,
|
||||
is_banned boolean DEFAULT false NOT NULL,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
other_names text[] DEFAULT '{}'::text[] NOT NULL,
|
||||
@ -260,7 +259,6 @@ CREATE TABLE public.artists (
|
||||
name character varying NOT NULL,
|
||||
creator_id integer NOT NULL,
|
||||
is_active boolean DEFAULT true NOT NULL,
|
||||
is_banned boolean DEFAULT false NOT NULL,
|
||||
group_name character varying DEFAULT ''::character varying NOT NULL,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
@ -568,8 +566,7 @@ CREATE TABLE public.dmails (
|
||||
is_deleted boolean DEFAULT false NOT NULL,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
creator_ip_addr inet NOT NULL,
|
||||
is_spam boolean DEFAULT false
|
||||
creator_ip_addr inet NOT NULL
|
||||
);
|
||||
|
||||
|
||||
@ -701,42 +698,6 @@ CREATE SEQUENCE public.exception_logs_id_seq
|
||||
ALTER SEQUENCE public.exception_logs_id_seq OWNED BY public.exception_logs.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: favorite_groups; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public.favorite_groups (
|
||||
id integer NOT NULL,
|
||||
name text NOT NULL,
|
||||
creator_id integer NOT NULL,
|
||||
post_ids text DEFAULT ''::text NOT NULL,
|
||||
post_count integer DEFAULT 0 NOT NULL,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
is_public boolean DEFAULT false NOT NULL
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: favorite_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.favorite_groups_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: favorite_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE public.favorite_groups_id_seq OWNED BY public.favorite_groups.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: favorites; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@ -959,7 +920,6 @@ CREATE TABLE public.forum_topics (
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
category_id integer DEFAULT 0 NOT NULL,
|
||||
min_level integer DEFAULT 0 NOT NULL,
|
||||
creator_ip_addr inet
|
||||
);
|
||||
|
||||
@ -1230,38 +1190,6 @@ CREATE SEQUENCE public.notes_id_seq
|
||||
ALTER SEQUENCE public.notes_id_seq OWNED BY public.notes.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: pixiv_ugoira_frame_data; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public.pixiv_ugoira_frame_data (
|
||||
id integer NOT NULL,
|
||||
post_id integer,
|
||||
data text NOT NULL,
|
||||
content_type character varying NOT NULL
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: pixiv_ugoira_frame_data_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.pixiv_ugoira_frame_data_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: pixiv_ugoira_frame_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE public.pixiv_ugoira_frame_data_id_seq OWNED BY public.pixiv_ugoira_frame_data.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: pool_versions; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@ -1344,41 +1272,6 @@ CREATE SEQUENCE public.pools_id_seq
|
||||
ALTER SEQUENCE public.pools_id_seq OWNED BY public.pools.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_appeals; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public.post_appeals (
|
||||
id integer NOT NULL,
|
||||
post_id integer NOT NULL,
|
||||
creator_id integer NOT NULL,
|
||||
creator_ip_addr inet,
|
||||
reason text,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_appeals_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.post_appeals_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_appeals_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE public.post_appeals_id_seq OWNED BY public.post_appeals.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_approvals; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@ -1516,65 +1409,6 @@ CREATE SEQUENCE public.post_flags_id_seq
|
||||
ALTER SEQUENCE public.post_flags_id_seq OWNED BY public.post_flags.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_image_hashes; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public.post_image_hashes (
|
||||
id bigint NOT NULL,
|
||||
post_id bigint NOT NULL,
|
||||
nw double precision NOT NULL,
|
||||
ne double precision NOT NULL,
|
||||
sw double precision NOT NULL,
|
||||
se double precision NOT NULL,
|
||||
phash bytea
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_image_hashes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.post_image_hashes_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_image_hashes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE public.post_image_hashes_id_seq OWNED BY public.post_image_hashes.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_replacements; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public.post_replacements (
|
||||
id integer NOT NULL,
|
||||
post_id integer NOT NULL,
|
||||
creator_id integer NOT NULL,
|
||||
created_at timestamp without time zone NOT NULL,
|
||||
updated_at timestamp without time zone NOT NULL,
|
||||
file_ext character varying,
|
||||
file_size integer,
|
||||
image_width integer,
|
||||
image_height integer,
|
||||
md5 character varying,
|
||||
old_image_height integer,
|
||||
old_image_width integer,
|
||||
old_md5 character varying,
|
||||
old_file_size integer,
|
||||
old_file_ext character varying,
|
||||
replacement_url text,
|
||||
original_url text
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_replacements2; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@ -1622,26 +1456,6 @@ CREATE SEQUENCE public.post_replacements2_id_seq
|
||||
ALTER SEQUENCE public.post_replacements2_id_seq OWNED BY public.post_replacements2.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_replacements_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.post_replacements_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_replacements_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE public.post_replacements_id_seq OWNED BY public.post_replacements.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_report_reasons; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@ -1748,15 +1562,6 @@ CREATE SEQUENCE public.post_sets_id_seq
|
||||
ALTER SEQUENCE public.post_sets_id_seq OWNED BY public.post_sets.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_updates; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE UNLOGGED TABLE public.post_updates (
|
||||
post_id integer
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_versions; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@ -1881,7 +1686,6 @@ CREATE TABLE public.posts (
|
||||
image_height integer NOT NULL,
|
||||
parent_id integer,
|
||||
has_children boolean DEFAULT false NOT NULL,
|
||||
pixiv_id integer,
|
||||
last_commented_at timestamp without time zone,
|
||||
has_active_children boolean DEFAULT false,
|
||||
bit_flags bigint DEFAULT 0 NOT NULL,
|
||||
@ -1938,40 +1742,6 @@ CREATE SEQUENCE public.posts_id_seq
|
||||
ALTER SEQUENCE public.posts_id_seq OWNED BY public.posts.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: saved_searches; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public.saved_searches (
|
||||
id integer NOT NULL,
|
||||
user_id integer,
|
||||
query text,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
labels text[] DEFAULT '{}'::text[] NOT NULL
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: saved_searches_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.saved_searches_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: saved_searches_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE public.saved_searches_id_seq OWNED BY public.saved_searches.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@ -2362,8 +2132,6 @@ ALTER SEQUENCE public.upload_whitelists_id_seq OWNED BY public.upload_whitelists
|
||||
CREATE TABLE public.uploads (
|
||||
id integer NOT NULL,
|
||||
source text,
|
||||
file_path character varying,
|
||||
content_type character varying,
|
||||
rating character(1) NOT NULL,
|
||||
uploader_id integer NOT NULL,
|
||||
uploader_ip_addr inet NOT NULL,
|
||||
@ -2374,15 +2142,12 @@ CREATE TABLE public.uploads (
|
||||
md5_confirmation character varying,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
server text,
|
||||
parent_id integer,
|
||||
md5 character varying,
|
||||
file_ext character varying,
|
||||
file_size integer,
|
||||
image_width integer,
|
||||
image_height integer,
|
||||
context text,
|
||||
referer_url text,
|
||||
description text DEFAULT ''::text NOT NULL
|
||||
);
|
||||
|
||||
@ -2407,17 +2172,6 @@ CREATE SEQUENCE public.uploads_id_seq
|
||||
ALTER SEQUENCE public.uploads_id_seq OWNED BY public.uploads.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: user_blacklisted_tags; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public.user_blacklisted_tags (
|
||||
id integer NOT NULL,
|
||||
user_id integer NOT NULL,
|
||||
tags text NOT NULL
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: user_feedback; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@ -2603,8 +2357,8 @@ furry -rating:s'::text,
|
||||
bit_prefs bigint DEFAULT 0 NOT NULL,
|
||||
last_ip_addr inet,
|
||||
unread_dmail_count integer DEFAULT 0 NOT NULL,
|
||||
profile_about text DEFAULT ''::text,
|
||||
profile_artinfo text DEFAULT ''::text,
|
||||
profile_about text DEFAULT ''::text NOT NULL,
|
||||
profile_artinfo text DEFAULT ''::text NOT NULL,
|
||||
avatar_id integer
|
||||
);
|
||||
|
||||
@ -2813,13 +2567,6 @@ ALTER TABLE ONLY public.email_blacklists ALTER COLUMN id SET DEFAULT nextval('pu
|
||||
ALTER TABLE ONLY public.exception_logs ALTER COLUMN id SET DEFAULT nextval('public.exception_logs_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: favorite_groups id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.favorite_groups ALTER COLUMN id SET DEFAULT nextval('public.favorite_groups_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: favorites id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
@ -2911,13 +2658,6 @@ ALTER TABLE ONLY public.note_versions ALTER COLUMN id SET DEFAULT nextval('publi
|
||||
ALTER TABLE ONLY public.notes ALTER COLUMN id SET DEFAULT nextval('public.notes_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: pixiv_ugoira_frame_data id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.pixiv_ugoira_frame_data ALTER COLUMN id SET DEFAULT nextval('public.pixiv_ugoira_frame_data_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: pool_versions id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
@ -2932,13 +2672,6 @@ ALTER TABLE ONLY public.pool_versions ALTER COLUMN id SET DEFAULT nextval('publi
|
||||
ALTER TABLE ONLY public.pools ALTER COLUMN id SET DEFAULT nextval('public.pools_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_appeals id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.post_appeals ALTER COLUMN id SET DEFAULT nextval('public.post_appeals_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_approvals id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
@ -2967,20 +2700,6 @@ ALTER TABLE ONLY public.post_events ALTER COLUMN id SET DEFAULT nextval('public.
|
||||
ALTER TABLE ONLY public.post_flags ALTER COLUMN id SET DEFAULT nextval('public.post_flags_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_image_hashes id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.post_image_hashes ALTER COLUMN id SET DEFAULT nextval('public.post_image_hashes_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_replacements id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.post_replacements ALTER COLUMN id SET DEFAULT nextval('public.post_replacements_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_replacements2 id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
@ -3037,13 +2756,6 @@ ALTER TABLE ONLY public.posts ALTER COLUMN id SET DEFAULT nextval('public.posts_
|
||||
ALTER TABLE ONLY public.posts ALTER COLUMN change_seq SET DEFAULT nextval('public.posts_change_seq_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: saved_searches id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.saved_searches ALTER COLUMN id SET DEFAULT nextval('public.saved_searches_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: staff_audit_logs id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
@ -3298,14 +3010,6 @@ ALTER TABLE ONLY public.exception_logs
|
||||
ADD CONSTRAINT exception_logs_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: favorite_groups favorite_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.favorite_groups
|
||||
ADD CONSTRAINT favorite_groups_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: favorites favorites_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@ -3418,14 +3122,6 @@ ALTER TABLE ONLY public.notes
|
||||
ADD CONSTRAINT notes_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: pixiv_ugoira_frame_data pixiv_ugoira_frame_data_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.pixiv_ugoira_frame_data
|
||||
ADD CONSTRAINT pixiv_ugoira_frame_data_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: pool_versions pool_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@ -3442,14 +3138,6 @@ ALTER TABLE ONLY public.pools
|
||||
ADD CONSTRAINT pools_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_appeals post_appeals_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.post_appeals
|
||||
ADD CONSTRAINT post_appeals_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_approvals post_approvals_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@ -3482,14 +3170,6 @@ ALTER TABLE ONLY public.post_flags
|
||||
ADD CONSTRAINT post_flags_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_image_hashes post_image_hashes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.post_image_hashes
|
||||
ADD CONSTRAINT post_image_hashes_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_replacements2 post_replacements2_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@ -3498,14 +3178,6 @@ ALTER TABLE ONLY public.post_replacements2
|
||||
ADD CONSTRAINT post_replacements2_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_replacements post_replacements_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.post_replacements
|
||||
ADD CONSTRAINT post_replacements_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_report_reasons post_report_reasons_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@ -3556,14 +3228,6 @@ ALTER TABLE ONLY public.posts
|
||||
ADD CONSTRAINT posts_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: saved_searches saved_searches_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.saved_searches
|
||||
ADD CONSTRAINT saved_searches_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@ -3982,20 +3646,6 @@ CREATE INDEX index_edit_histories_on_user_id ON public.edit_histories USING btre
|
||||
CREATE INDEX index_edit_histories_on_versionable_id_and_versionable_type ON public.edit_histories USING btree (versionable_id, versionable_type);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_favorite_groups_on_creator_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_favorite_groups_on_creator_id ON public.favorite_groups USING btree (creator_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_favorite_groups_on_lower_name; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_favorite_groups_on_lower_name ON public.favorite_groups USING btree (lower(name));
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_favorites_on_post_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@ -4199,13 +3849,6 @@ CREATE INDEX index_notes_on_creator_id_and_post_id ON public.notes USING btree (
|
||||
CREATE INDEX index_notes_on_post_id ON public.notes USING btree (post_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_pixiv_ugoira_frame_data_on_post_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE UNIQUE INDEX index_pixiv_ugoira_frame_data_on_post_id ON public.pixiv_ugoira_frame_data USING btree (post_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_pool_versions_on_pool_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@ -4262,41 +3905,6 @@ CREATE INDEX index_pools_on_name_trgm ON public.pools USING gin (lower((name)::t
|
||||
CREATE INDEX index_pools_on_updated_at ON public.pools USING btree (updated_at);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_post_appeals_on_created_at; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_post_appeals_on_created_at ON public.post_appeals USING btree (created_at);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_post_appeals_on_creator_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_post_appeals_on_creator_id ON public.post_appeals USING btree (creator_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_post_appeals_on_creator_ip_addr; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_post_appeals_on_creator_ip_addr ON public.post_appeals USING btree (creator_ip_addr);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_post_appeals_on_post_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_post_appeals_on_post_id ON public.post_appeals USING btree (post_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_post_appeals_on_reason_tsvector; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_post_appeals_on_reason_tsvector ON public.post_appeals USING gin (to_tsvector('english'::regconfig, reason));
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_post_approvals_on_post_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@ -4367,13 +3975,6 @@ CREATE INDEX index_post_flags_on_post_id ON public.post_flags USING btree (post_
|
||||
CREATE INDEX index_post_flags_on_reason_tsvector ON public.post_flags USING gin (to_tsvector('english'::regconfig, reason));
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_post_image_hashes_on_post_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE UNIQUE INDEX index_post_image_hashes_on_post_id ON public.post_image_hashes USING btree (post_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_post_replacements2_on_creator_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@ -4388,20 +3989,6 @@ CREATE INDEX index_post_replacements2_on_creator_id ON public.post_replacements2
|
||||
CREATE INDEX index_post_replacements2_on_post_id ON public.post_replacements2 USING btree (post_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_post_replacements_on_creator_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_post_replacements_on_creator_id ON public.post_replacements USING btree (creator_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_post_replacements_on_post_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_post_replacements_on_post_id ON public.post_replacements USING btree (post_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_post_sets_on_post_ids; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@ -4500,13 +4087,6 @@ CREATE UNIQUE INDEX index_posts_on_md5 ON public.posts USING btree (md5);
|
||||
CREATE INDEX index_posts_on_parent_id ON public.posts USING btree (parent_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_posts_on_pixiv_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_posts_on_pixiv_id ON public.posts USING btree (pixiv_id) WHERE (pixiv_id IS NOT NULL);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_posts_on_tags_index; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@ -4528,27 +4108,6 @@ CREATE INDEX index_posts_on_uploader_id ON public.posts USING btree (uploader_id
|
||||
CREATE INDEX index_posts_on_uploader_ip_addr ON public.posts USING btree (uploader_ip_addr);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_saved_searches_on_labels; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_saved_searches_on_labels ON public.saved_searches USING gin (labels);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_saved_searches_on_query; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_saved_searches_on_query ON public.saved_searches USING btree (query);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_saved_searches_on_user_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_saved_searches_on_user_id ON public.saved_searches USING btree (user_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_staff_audit_logs_on_user_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@ -4675,13 +4234,6 @@ CREATE INDEX index_tags_on_name_prefix ON public.tags USING gin (regexp_replace(
|
||||
CREATE INDEX index_tags_on_name_trgm ON public.tags USING gin (name public.gin_trgm_ops);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_uploads_on_referer_url; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_uploads_on_referer_url ON public.uploads USING btree (referer_url);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_uploads_on_source; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@ -4843,13 +4395,6 @@ CREATE INDEX index_wiki_pages_on_title_pattern ON public.wiki_pages USING btree
|
||||
CREATE INDEX index_wiki_pages_on_updated_at ON public.wiki_pages USING btree (updated_at);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_image_hashes_index; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX post_image_hashes_index ON public.post_image_hashes USING btree (nw, ne, sw, se);
|
||||
|
||||
|
||||
--
|
||||
-- Name: posts posts_update_change_seq; Type: TRIGGER; Schema: public; Owner: -
|
||||
--
|
||||
@ -4921,14 +4466,6 @@ ALTER TABLE ONLY public.staff_audit_logs
|
||||
ADD CONSTRAINT fk_rails_02329e5ef9 FOREIGN KEY (user_id) REFERENCES public.users(id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: post_image_hashes fk_rails_2b7afcc2f0; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.post_image_hashes
|
||||
ADD CONSTRAINT fk_rails_2b7afcc2f0 FOREIGN KEY (post_id) REFERENCES public.posts(id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: favorites fk_rails_a7668ef613; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@ -5207,6 +4744,6 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||
('20210718172512'),
|
||||
('20220106081415'),
|
||||
('20220203154846'),
|
||||
('20220219202441');
|
||||
|
||||
('20220219202441'),
|
||||
('20220316162257');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user