From e7d6b8c4496828c19cc9979acd50becf5c4e497b Mon Sep 17 00:00:00 2001 From: albert Date: Tue, 21 Aug 2012 18:29:09 -0400 Subject: [PATCH] maintain current directory structure for images --- app/models/post.rb | 8 +- app/models/upload.rb | 4 +- config/danbooru_default_config.rb | 4 + config/deploy.rb | 3 +- db/structure.sql | 1024 +++++++++++++++++++++++++---- test/unit/upload_test.rb | 4 +- 6 files changed, 899 insertions(+), 148 deletions(-) diff --git a/app/models/post.rb b/app/models/post.rb index 2eac3e559..2dfc317de 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -90,12 +90,12 @@ class Post < ActiveRecord::Base end def file_path - "#{Rails.root}/public/data/original/#{file_path_prefix}#{md5}.#{file_ext}" + "#{Rails.root}/public/data/#{file_path_prefix}#{md5}.#{file_ext}" end def large_file_path if has_large? - "#{Rails.root}/public/data/large/#{file_path_prefix}#{md5}.jpg" + "#{Rails.root}/public/data/sample/#{file_path_prefix}#{Danbooru.config.large_image_prefix}#{md5}.jpg" else file_path end @@ -118,12 +118,12 @@ class Post < ActiveRecord::Base end def file_url - "/data/original/#{file_path_prefix}#{md5}.#{file_ext}" + "/data/#{file_path_prefix}#{md5}.#{file_ext}" end def large_file_url if has_large? - "/data/large/#{file_path_prefix}#{md5}.jpg" + "/data/sample/#{file_path_prefix}#{Danbooru.config.large_image_prefix}#{md5}.jpg" else file_url end diff --git a/app/models/upload.rb b/app/models/upload.rb index 3a1cedea3..07a68e95f 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -209,7 +209,7 @@ class Upload < ActiveRecord::Base module FilePathMethods def md5_file_path prefix = Rails.env == "test" ? "test." : "" - "#{Rails.root}/public/data/original/#{prefix}#{md5}.#{file_ext}" + "#{Rails.root}/public/data/#{prefix}#{md5}.#{file_ext}" end def resized_file_path_for(width) @@ -220,7 +220,7 @@ class Upload < ActiveRecord::Base "#{Rails.root}/public/data/preview/#{prefix}#{md5}.jpg" when Danbooru.config.large_image_width - "#{Rails.root}/public/data/large/#{prefix}#{md5}.jpg" + "#{Rails.root}/public/data/sample/#{prefix}#{md5}.jpg" end end diff --git a/config/danbooru_default_config.rb b/config/danbooru_default_config.rb index b69006d7d..b88fb43d6 100644 --- a/config/danbooru_default_config.rb +++ b/config/danbooru_default_config.rb @@ -73,6 +73,10 @@ module Danbooru 900 end + def large_image_prefix + "sample-" + end + # When calculating statistics based on the posts table, gather this many posts to sample from. def post_sample_size 300 diff --git a/config/deploy.rb b/config/deploy.rb index b862cd70f..7f754371d 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -44,8 +44,7 @@ namespace :data do task :setup_directories do run "mkdir -p #{deploy_to}/shared/data" run "mkdir #{deploy_to}/shared/data/preview" - run "mkdir #{deploy_to}/shared/data/large" - run "mkdir #{deploy_to}/shared/data/original" + run "mkdir #{deploy_to}/shared/data/sample" end task :link_directories do diff --git a/db/structure.sql b/db/structure.sql index 215109ff9..7e92d0572 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -4,16 +4,22 @@ SET statement_timeout = 0; SET client_encoding = 'UTF8'; -SET standard_conforming_strings = off; +SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -SET escape_string_warning = off; -- --- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: - +-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - -- -CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql; +CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; + + +-- +-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; SET search_path = public, pg_catalog; @@ -402,8 +408,8 @@ CREATE TABLE advertisement_hits ( id integer NOT NULL, advertisement_id integer NOT NULL, ip_addr inet NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -440,8 +446,8 @@ CREATE TABLE advertisements ( height integer NOT NULL, file_name character varying(255) NOT NULL, is_work_safe boolean DEFAULT false NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -471,8 +477,8 @@ ALTER SEQUENCE advertisements_id_seq OWNED BY advertisements.id; CREATE TABLE amazon_backups ( id integer NOT NULL, last_id integer, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -504,8 +510,8 @@ CREATE TABLE artist_urls ( artist_id integer NOT NULL, url text NOT NULL, normalized_url text NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -543,8 +549,8 @@ CREATE TABLE artist_versions ( group_name character varying(255), url_string text, is_banned boolean DEFAULT false NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -580,8 +586,8 @@ CREATE TABLE artists ( other_names text, other_names_index tsvector, group_name character varying(255), - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -614,8 +620,8 @@ CREATE TABLE bans ( reason text NOT NULL, banner_id integer NOT NULL, expires_at timestamp without time zone NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -647,8 +653,8 @@ CREATE TABLE comment_votes ( comment_id integer NOT NULL, user_id integer NOT NULL, score integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -683,8 +689,8 @@ CREATE TABLE comments ( ip_addr inet NOT NULL, body_index tsvector NOT NULL, score integer DEFAULT 0 NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -721,8 +727,8 @@ CREATE TABLE delayed_jobs ( locked_at timestamp without time zone, failed_at timestamp without time zone, locked_by character varying(255), - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -759,8 +765,8 @@ CREATE TABLE dmails ( message_index tsvector NOT NULL, is_read boolean DEFAULT false NOT NULL, is_deleted boolean DEFAULT false NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -794,25 +800,6 @@ CREATE TABLE favorites ( ); --- --- Name: favorites_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE favorites_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: favorites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE favorites_id_seq OWNED BY favorites.id; - - -- -- Name: favorites_0; Type: TABLE; Schema: public; Owner: -; Tablespace: -- @@ -1813,6 +1800,25 @@ CREATE TABLE favorites_99 ( INHERITS (favorites); +-- +-- Name: favorites_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE favorites_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: favorites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE favorites_id_seq OWNED BY favorites.id; + + -- -- Name: forum_posts; Type: TABLE; Schema: public; Owner: -; Tablespace: -- @@ -1824,9 +1830,9 @@ CREATE TABLE forum_posts ( updater_id integer NOT NULL, body text NOT NULL, text_index tsvector NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - is_deleted boolean DEFAULT false NOT NULL + is_deleted boolean DEFAULT false NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -1861,10 +1867,10 @@ CREATE TABLE forum_topics ( response_count integer DEFAULT 0 NOT NULL, is_sticky boolean DEFAULT false NOT NULL, is_locked boolean DEFAULT false NOT NULL, + is_deleted boolean DEFAULT false NOT NULL, text_index tsvector NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - is_deleted boolean DEFAULT false NOT NULL + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -1896,8 +1902,8 @@ CREATE TABLE ip_bans ( creator_id integer NOT NULL, ip_addr inet NOT NULL, reason text NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -1929,8 +1935,8 @@ CREATE TABLE janitor_trials ( creator_id integer NOT NULL, user_id integer NOT NULL, original_level integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -1961,8 +1967,8 @@ CREATE TABLE mod_actions ( id integer NOT NULL, creator_id integer NOT NULL, description text NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -1994,8 +2000,8 @@ CREATE TABLE news_updates ( message text NOT NULL, creator_id integer NOT NULL, updater_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2034,8 +2040,8 @@ CREATE TABLE note_versions ( height integer NOT NULL, is_active boolean DEFAULT true NOT NULL, body text NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2073,8 +2079,8 @@ CREATE TABLE notes ( is_active boolean DEFAULT true NOT NULL, body text NOT NULL, body_index tsvector NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2107,8 +2113,8 @@ CREATE TABLE pool_versions ( post_ids text DEFAULT ''::text NOT NULL, updater_id integer NOT NULL, updater_ip_addr inet NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2143,9 +2149,9 @@ CREATE TABLE pools ( is_active boolean DEFAULT true 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_deleted boolean DEFAULT false NOT NULL + is_deleted boolean DEFAULT false NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2178,8 +2184,8 @@ CREATE TABLE post_appeals ( creator_id integer NOT NULL, creator_ip_addr integer NOT NULL, reason text, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2210,8 +2216,8 @@ CREATE TABLE post_disapprovals ( id integer NOT NULL, user_id integer NOT NULL, post_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2245,8 +2251,8 @@ CREATE TABLE post_flags ( creator_ip_addr inet NOT NULL, reason text, is_resolved boolean DEFAULT false NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2275,8 +2281,8 @@ ALTER SEQUENCE post_flags_id_seq OWNED BY post_flags.id; CREATE TABLE post_versions ( id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, post_id integer NOT NULL, tags text DEFAULT ''::text NOT NULL, rating character(1), @@ -2315,8 +2321,8 @@ CREATE TABLE post_votes ( post_id integer NOT NULL, user_id integer NOT NULL, score integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2345,8 +2351,8 @@ ALTER SEQUENCE post_votes_id_seq OWNED BY post_votes.id; CREATE TABLE posts ( id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, up_score integer DEFAULT 0 NOT NULL, down_score integer DEFAULT 0 NOT NULL, score integer DEFAULT 0 NOT NULL, @@ -2423,8 +2429,8 @@ CREATE TABLE tag_aliases ( creator_ip_addr inet NOT NULL, forum_topic_id integer, status text DEFAULT 'pending'::text NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2460,8 +2466,8 @@ CREATE TABLE tag_implications ( creator_ip_addr inet NOT NULL, forum_topic_id integer, status text DEFAULT 'pending'::text NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2497,8 +2503,8 @@ CREATE TABLE tag_subscriptions ( is_public boolean DEFAULT true NOT NULL, last_accessed_at timestamp without time zone, is_opted_in boolean DEFAULT false NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2532,8 +2538,8 @@ CREATE TABLE tags ( category integer DEFAULT 0 NOT NULL, related_tags text, related_tags_updated_at timestamp without time zone, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2573,8 +2579,8 @@ CREATE TABLE uploads ( backtrace text, post_id integer, md5_confirmation character varying(255), - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2607,8 +2613,8 @@ CREATE TABLE user_feedback ( creator_id integer NOT NULL, category character varying(255) NOT NULL, body text NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2639,8 +2645,8 @@ CREATE TABLE user_password_reset_nonces ( id integer NOT NULL, key character varying(255) NOT NULL, email character varying(255) NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2669,8 +2675,8 @@ ALTER SEQUENCE user_password_reset_nonces_id_seq OWNED BY user_password_reset_no CREATE TABLE users ( id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, name character varying(255) NOT NULL, password_hash character varying(255) NOT NULL, email character varying(255), @@ -2728,8 +2734,8 @@ CREATE TABLE wiki_page_versions ( title character varying(255) NOT NULL, body text NOT NULL, is_locked boolean NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2763,8 +2769,8 @@ CREATE TABLE wiki_pages ( body text NOT NULL, body_index tsvector NOT NULL, is_locked boolean DEFAULT false NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); @@ -2791,266 +2797,966 @@ ALTER SEQUENCE wiki_pages_id_seq OWNED BY wiki_pages.id; -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE advertisement_hits ALTER COLUMN id SET DEFAULT nextval('advertisement_hits_id_seq'::regclass); +ALTER TABLE ONLY advertisement_hits ALTER COLUMN id SET DEFAULT nextval('advertisement_hits_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE advertisements ALTER COLUMN id SET DEFAULT nextval('advertisements_id_seq'::regclass); +ALTER TABLE ONLY advertisements ALTER COLUMN id SET DEFAULT nextval('advertisements_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE amazon_backups ALTER COLUMN id SET DEFAULT nextval('amazon_backups_id_seq'::regclass); +ALTER TABLE ONLY amazon_backups ALTER COLUMN id SET DEFAULT nextval('amazon_backups_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE artist_urls ALTER COLUMN id SET DEFAULT nextval('artist_urls_id_seq'::regclass); +ALTER TABLE ONLY artist_urls ALTER COLUMN id SET DEFAULT nextval('artist_urls_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE artist_versions ALTER COLUMN id SET DEFAULT nextval('artist_versions_id_seq'::regclass); +ALTER TABLE ONLY artist_versions ALTER COLUMN id SET DEFAULT nextval('artist_versions_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE artists ALTER COLUMN id SET DEFAULT nextval('artists_id_seq'::regclass); +ALTER TABLE ONLY artists ALTER COLUMN id SET DEFAULT nextval('artists_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE bans ALTER COLUMN id SET DEFAULT nextval('bans_id_seq'::regclass); +ALTER TABLE ONLY bans ALTER COLUMN id SET DEFAULT nextval('bans_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE comment_votes ALTER COLUMN id SET DEFAULT nextval('comment_votes_id_seq'::regclass); +ALTER TABLE ONLY comment_votes ALTER COLUMN id SET DEFAULT nextval('comment_votes_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE comments ALTER COLUMN id SET DEFAULT nextval('comments_id_seq'::regclass); +ALTER TABLE ONLY comments ALTER COLUMN id SET DEFAULT nextval('comments_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE delayed_jobs ALTER COLUMN id SET DEFAULT nextval('delayed_jobs_id_seq'::regclass); +ALTER TABLE ONLY delayed_jobs ALTER COLUMN id SET DEFAULT nextval('delayed_jobs_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE dmails ALTER COLUMN id SET DEFAULT nextval('dmails_id_seq'::regclass); +ALTER TABLE ONLY dmails ALTER COLUMN id SET DEFAULT nextval('dmails_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE favorites ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); +ALTER TABLE ONLY favorites ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE forum_posts ALTER COLUMN id SET DEFAULT nextval('forum_posts_id_seq'::regclass); +ALTER TABLE ONLY favorites_0 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE forum_topics ALTER COLUMN id SET DEFAULT nextval('forum_topics_id_seq'::regclass); +ALTER TABLE ONLY favorites_1 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ip_bans ALTER COLUMN id SET DEFAULT nextval('ip_bans_id_seq'::regclass); +ALTER TABLE ONLY favorites_10 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE janitor_trials ALTER COLUMN id SET DEFAULT nextval('janitor_trials_id_seq'::regclass); +ALTER TABLE ONLY favorites_11 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE mod_actions ALTER COLUMN id SET DEFAULT nextval('mod_actions_id_seq'::regclass); +ALTER TABLE ONLY favorites_12 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE news_updates ALTER COLUMN id SET DEFAULT nextval('news_updates_id_seq'::regclass); +ALTER TABLE ONLY favorites_13 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE note_versions ALTER COLUMN id SET DEFAULT nextval('note_versions_id_seq'::regclass); +ALTER TABLE ONLY favorites_14 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE notes ALTER COLUMN id SET DEFAULT nextval('notes_id_seq'::regclass); +ALTER TABLE ONLY favorites_15 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE pool_versions ALTER COLUMN id SET DEFAULT nextval('pool_versions_id_seq'::regclass); +ALTER TABLE ONLY favorites_16 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE pools ALTER COLUMN id SET DEFAULT nextval('pools_id_seq'::regclass); +ALTER TABLE ONLY favorites_17 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE post_appeals ALTER COLUMN id SET DEFAULT nextval('post_appeals_id_seq'::regclass); +ALTER TABLE ONLY favorites_18 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE post_disapprovals ALTER COLUMN id SET DEFAULT nextval('post_disapprovals_id_seq'::regclass); +ALTER TABLE ONLY favorites_19 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE post_flags ALTER COLUMN id SET DEFAULT nextval('post_flags_id_seq'::regclass); +ALTER TABLE ONLY favorites_2 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE post_versions ALTER COLUMN id SET DEFAULT nextval('post_versions_id_seq'::regclass); +ALTER TABLE ONLY favorites_20 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE post_votes ALTER COLUMN id SET DEFAULT nextval('post_votes_id_seq'::regclass); +ALTER TABLE ONLY favorites_21 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE posts ALTER COLUMN id SET DEFAULT nextval('posts_id_seq'::regclass); +ALTER TABLE ONLY favorites_22 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE tag_aliases ALTER COLUMN id SET DEFAULT nextval('tag_aliases_id_seq'::regclass); +ALTER TABLE ONLY favorites_23 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE tag_implications ALTER COLUMN id SET DEFAULT nextval('tag_implications_id_seq'::regclass); +ALTER TABLE ONLY favorites_24 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE tag_subscriptions ALTER COLUMN id SET DEFAULT nextval('tag_subscriptions_id_seq'::regclass); +ALTER TABLE ONLY favorites_25 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE tags ALTER COLUMN id SET DEFAULT nextval('tags_id_seq'::regclass); +ALTER TABLE ONLY favorites_26 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE uploads ALTER COLUMN id SET DEFAULT nextval('uploads_id_seq'::regclass); +ALTER TABLE ONLY favorites_27 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE user_feedback ALTER COLUMN id SET DEFAULT nextval('user_feedback_id_seq'::regclass); +ALTER TABLE ONLY favorites_28 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE user_password_reset_nonces ALTER COLUMN id SET DEFAULT nextval('user_password_reset_nonces_id_seq'::regclass); +ALTER TABLE ONLY favorites_29 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass); +ALTER TABLE ONLY favorites_3 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE wiki_page_versions ALTER COLUMN id SET DEFAULT nextval('wiki_page_versions_id_seq'::regclass); +ALTER TABLE ONLY favorites_30 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE wiki_pages ALTER COLUMN id SET DEFAULT nextval('wiki_pages_id_seq'::regclass); +ALTER TABLE ONLY favorites_31 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_32 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_33 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_34 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_35 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_36 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_37 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_38 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_39 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_4 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_40 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_41 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_42 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_43 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_44 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_45 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_46 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_47 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_48 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_49 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_5 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_50 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_51 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_52 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_53 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_54 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_55 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_56 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_57 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_58 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_59 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_6 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_60 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_61 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_62 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_63 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_64 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_65 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_66 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_67 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_68 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_69 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_7 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_70 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_71 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_72 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_73 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_74 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_75 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_76 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_77 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_78 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_79 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_8 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_80 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_81 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_82 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_83 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_84 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_85 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_86 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_87 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_88 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_89 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_9 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_90 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_91 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_92 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_93 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_94 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_95 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_96 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_97 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_98 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY favorites_99 ALTER COLUMN id SET DEFAULT nextval('favorites_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY forum_posts ALTER COLUMN id SET DEFAULT nextval('forum_posts_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY forum_topics ALTER COLUMN id SET DEFAULT nextval('forum_topics_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY ip_bans ALTER COLUMN id SET DEFAULT nextval('ip_bans_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY janitor_trials ALTER COLUMN id SET DEFAULT nextval('janitor_trials_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY mod_actions ALTER COLUMN id SET DEFAULT nextval('mod_actions_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY news_updates ALTER COLUMN id SET DEFAULT nextval('news_updates_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY note_versions ALTER COLUMN id SET DEFAULT nextval('note_versions_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY notes ALTER COLUMN id SET DEFAULT nextval('notes_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY pool_versions ALTER COLUMN id SET DEFAULT nextval('pool_versions_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY pools ALTER COLUMN id SET DEFAULT nextval('pools_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY post_appeals ALTER COLUMN id SET DEFAULT nextval('post_appeals_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY post_disapprovals ALTER COLUMN id SET DEFAULT nextval('post_disapprovals_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY post_flags ALTER COLUMN id SET DEFAULT nextval('post_flags_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY post_versions ALTER COLUMN id SET DEFAULT nextval('post_versions_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY post_votes ALTER COLUMN id SET DEFAULT nextval('post_votes_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY posts ALTER COLUMN id SET DEFAULT nextval('posts_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY tag_aliases ALTER COLUMN id SET DEFAULT nextval('tag_aliases_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY tag_implications ALTER COLUMN id SET DEFAULT nextval('tag_implications_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY tag_subscriptions ALTER COLUMN id SET DEFAULT nextval('tag_subscriptions_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY tags ALTER COLUMN id SET DEFAULT nextval('tags_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY uploads ALTER COLUMN id SET DEFAULT nextval('uploads_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY user_feedback ALTER COLUMN id SET DEFAULT nextval('user_feedback_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY user_password_reset_nonces ALTER COLUMN id SET DEFAULT nextval('user_password_reset_nonces_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY wiki_page_versions ALTER COLUMN id SET DEFAULT nextval('wiki_page_versions_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY wiki_pages ALTER COLUMN id SET DEFAULT nextval('wiki_pages_id_seq'::regclass); -- @@ -3392,6 +4098,13 @@ CREATE INDEX index_artist_urls_on_artist_id ON artist_urls USING btree (artist_i CREATE INDEX index_artist_urls_on_normalized_url ON artist_urls USING btree (normalized_url); +-- +-- Name: index_artist_urls_on_normalized_url_pattern; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE INDEX index_artist_urls_on_normalized_url_pattern ON artist_urls USING btree (normalized_url text_pattern_ops); + + -- -- Name: index_artist_urls_on_url; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@ -3399,6 +4112,13 @@ CREATE INDEX index_artist_urls_on_normalized_url ON artist_urls USING btree (nor CREATE INDEX index_artist_urls_on_url ON artist_urls USING btree (url); +-- +-- Name: index_artist_urls_on_url_pattern; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE INDEX index_artist_urls_on_url_pattern ON artist_urls USING btree (url text_pattern_ops); + + -- -- Name: index_artist_versions_on_artist_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@ -5156,6 +5876,13 @@ CREATE INDEX index_post_votes_on_user_id ON post_votes USING btree (user_id); CREATE INDEX index_posts_on_created_at ON posts USING btree (created_at); +-- +-- Name: index_posts_on_created_at_date; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE INDEX index_posts_on_created_at_date ON posts USING btree (date(created_at)); + + -- -- Name: index_posts_on_file_size; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@ -5219,6 +5946,13 @@ CREATE INDEX index_posts_on_parent_id ON posts USING btree (parent_id); CREATE INDEX index_posts_on_source ON posts USING btree (source); +-- +-- Name: index_posts_on_source_pattern; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE INDEX index_posts_on_source_pattern ON posts USING btree (source text_pattern_ops); + + -- -- Name: index_posts_on_tags_index; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@ -5289,6 +6023,13 @@ CREATE INDEX index_tag_subscriptions_on_name ON tag_subscriptions USING btree (n CREATE UNIQUE INDEX index_tags_on_name ON tags USING btree (name); +-- +-- Name: index_tags_on_name_pattern; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE INDEX index_tags_on_name_pattern ON tags USING btree (name text_pattern_ops); + + -- -- Name: index_uploads_on_uploader_id; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@ -5352,6 +6093,13 @@ CREATE INDEX index_wiki_pages_on_body_index_index ON wiki_pages USING gin (body_ CREATE UNIQUE INDEX index_wiki_pages_on_title ON wiki_pages USING btree (title); +-- +-- Name: index_wiki_pages_on_title_pattern; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE INDEX index_wiki_pages_on_title_pattern ON wiki_pages USING btree (title text_pattern_ops); + + -- -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace: -- diff --git a/test/unit/upload_test.rb b/test/unit/upload_test.rb index 680713a2d..2df707b48 100644 --- a/test/unit/upload_test.rb +++ b/test/unit/upload_test.rb @@ -110,8 +110,8 @@ class UploadTest < ActiveSupport::TestCase context "resizer" do teardown do FileUtils.rm_f(Dir.glob("#{Rails.root}/public/data/preview/test.*.jpg")) - FileUtils.rm_f(Dir.glob("#{Rails.root}/public/data/large/test.*.jpg")) - FileUtils.rm_f(Dir.glob("#{Rails.root}/public/data/original/test.*.jpg")) + FileUtils.rm_f(Dir.glob("#{Rails.root}/public/data/sample/test.*.jpg")) + FileUtils.rm_f(Dir.glob("#{Rails.root}/public/data/test.*.jpg")) end should "generate several resized versions of the image" do