updated tests, switched to rails 3.0.0rc2

This commit is contained in:
albert
2010-08-26 14:36:02 -04:00
parent 694b6f0813
commit ad39553aac
48 changed files with 898 additions and 406 deletions

View File

@@ -1125,7 +1125,6 @@ CREATE TABLE posts (
is_rating_locked boolean DEFAULT false NOT NULL,
is_pending boolean DEFAULT false NOT NULL,
is_flagged boolean DEFAULT false NOT NULL,
is_deleted boolean DEFAULT false NOT NULL,
uploader_string character varying(255) NOT NULL,
uploader_ip_addr inet NOT NULL,
approver_string character varying(255) DEFAULT ''::character varying NOT NULL,
@@ -1144,7 +1143,9 @@ CREATE TABLE posts (
file_ext character varying(255) NOT NULL,
file_size integer NOT NULL,
image_width integer NOT NULL,
image_height integer NOT NULL
image_height integer NOT NULL,
parent_id integer,
has_children boolean DEFAULT false NOT NULL
);
@@ -1167,6 +1168,65 @@ CREATE SEQUENCE posts_id_seq
ALTER SEQUENCE posts_id_seq OWNED BY posts.id;
--
-- Name: removed_posts; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE removed_posts (
id integer NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
score integer DEFAULT 0 NOT NULL,
source character varying(255),
md5 character varying(255) NOT NULL,
rating character(1) DEFAULT 'q'::bpchar NOT NULL,
is_note_locked boolean DEFAULT false NOT NULL,
is_rating_locked boolean DEFAULT false NOT NULL,
is_pending boolean DEFAULT false NOT NULL,
is_flagged boolean DEFAULT false NOT NULL,
uploader_string character varying(255) NOT NULL,
uploader_ip_addr inet NOT NULL,
approver_string character varying(255) DEFAULT ''::character varying NOT NULL,
fav_string text DEFAULT ''::text NOT NULL,
pool_string text DEFAULT ''::text NOT NULL,
view_count integer DEFAULT 0 NOT NULL,
last_noted_at timestamp without time zone,
last_commented_at timestamp without time zone,
tag_string text DEFAULT ''::text NOT NULL,
tag_index tsvector,
tag_count integer DEFAULT 0 NOT NULL,
tag_count_general integer DEFAULT 0 NOT NULL,
tag_count_artist integer DEFAULT 0 NOT NULL,
tag_count_character integer DEFAULT 0 NOT NULL,
tag_count_copyright integer DEFAULT 0 NOT NULL,
file_ext character varying(255) NOT NULL,
file_size integer NOT NULL,
image_width integer NOT NULL,
image_height integer NOT NULL,
parent_id integer,
has_children boolean DEFAULT false NOT NULL
);
--
-- Name: removed_posts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE removed_posts_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
--
-- Name: removed_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE removed_posts_id_seq OWNED BY removed_posts.id;
--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
@@ -1771,6 +1831,13 @@ ALTER TABLE post_votes ALTER COLUMN id SET DEFAULT nextval('post_votes_id_seq'::
ALTER TABLE posts ALTER COLUMN id SET DEFAULT nextval('posts_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE removed_posts ALTER COLUMN id SET DEFAULT nextval('removed_posts_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
@@ -2097,6 +2164,14 @@ ALTER TABLE ONLY posts
ADD CONSTRAINT posts_pkey PRIMARY KEY (id);
--
-- Name: removed_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY removed_posts
ADD CONSTRAINT removed_posts_pkey PRIMARY KEY (id);
--
-- Name: tag_aliases_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
@@ -2317,6 +2392,13 @@ CREATE INDEX index_dmails_on_parent_id ON dmails USING btree (parent_id);
CREATE INDEX index_favorites_0_on_post_id ON favorites_0 USING btree (post_id);
--
-- Name: index_favorites_0_on_post_id_and_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_favorites_0_on_post_id_and_user_id ON favorites_0 USING btree (post_id, user_id);
--
-- Name: index_favorites_0_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2331,6 +2413,13 @@ CREATE INDEX index_favorites_0_on_user_id ON favorites_0 USING btree (user_id);
CREATE INDEX index_favorites_1_on_post_id ON favorites_1 USING btree (post_id);
--
-- Name: index_favorites_1_on_post_id_and_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_favorites_1_on_post_id_and_user_id ON favorites_1 USING btree (post_id, user_id);
--
-- Name: index_favorites_1_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2345,6 +2434,13 @@ CREATE INDEX index_favorites_1_on_user_id ON favorites_1 USING btree (user_id);
CREATE INDEX index_favorites_2_on_post_id ON favorites_2 USING btree (post_id);
--
-- Name: index_favorites_2_on_post_id_and_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_favorites_2_on_post_id_and_user_id ON favorites_2 USING btree (post_id, user_id);
--
-- Name: index_favorites_2_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2359,6 +2455,13 @@ CREATE INDEX index_favorites_2_on_user_id ON favorites_2 USING btree (user_id);
CREATE INDEX index_favorites_3_on_post_id ON favorites_3 USING btree (post_id);
--
-- Name: index_favorites_3_on_post_id_and_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_favorites_3_on_post_id_and_user_id ON favorites_3 USING btree (post_id, user_id);
--
-- Name: index_favorites_3_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2373,6 +2476,13 @@ CREATE INDEX index_favorites_3_on_user_id ON favorites_3 USING btree (user_id);
CREATE INDEX index_favorites_4_on_post_id ON favorites_4 USING btree (post_id);
--
-- Name: index_favorites_4_on_post_id_and_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_favorites_4_on_post_id_and_user_id ON favorites_4 USING btree (post_id, user_id);
--
-- Name: index_favorites_4_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2387,6 +2497,13 @@ CREATE INDEX index_favorites_4_on_user_id ON favorites_4 USING btree (user_id);
CREATE INDEX index_favorites_5_on_post_id ON favorites_5 USING btree (post_id);
--
-- Name: index_favorites_5_on_post_id_and_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_favorites_5_on_post_id_and_user_id ON favorites_5 USING btree (post_id, user_id);
--
-- Name: index_favorites_5_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2401,6 +2518,13 @@ CREATE INDEX index_favorites_5_on_user_id ON favorites_5 USING btree (user_id);
CREATE INDEX index_favorites_6_on_post_id ON favorites_6 USING btree (post_id);
--
-- Name: index_favorites_6_on_post_id_and_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_favorites_6_on_post_id_and_user_id ON favorites_6 USING btree (post_id, user_id);
--
-- Name: index_favorites_6_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2415,6 +2539,13 @@ CREATE INDEX index_favorites_6_on_user_id ON favorites_6 USING btree (user_id);
CREATE INDEX index_favorites_7_on_post_id ON favorites_7 USING btree (post_id);
--
-- Name: index_favorites_7_on_post_id_and_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_favorites_7_on_post_id_and_user_id ON favorites_7 USING btree (post_id, user_id);
--
-- Name: index_favorites_7_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2429,6 +2560,13 @@ CREATE INDEX index_favorites_7_on_user_id ON favorites_7 USING btree (user_id);
CREATE INDEX index_favorites_8_on_post_id ON favorites_8 USING btree (post_id);
--
-- Name: index_favorites_8_on_post_id_and_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_favorites_8_on_post_id_and_user_id ON favorites_8 USING btree (post_id, user_id);
--
-- Name: index_favorites_8_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2443,6 +2581,13 @@ CREATE INDEX index_favorites_8_on_user_id ON favorites_8 USING btree (user_id);
CREATE INDEX index_favorites_9_on_post_id ON favorites_9 USING btree (post_id);
--
-- Name: index_favorites_9_on_post_id_and_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_favorites_9_on_post_id_and_user_id ON favorites_9 USING btree (post_id, user_id);
--
-- Name: index_favorites_9_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2639,6 +2784,13 @@ CREATE UNIQUE INDEX index_posts_on_md5 ON posts USING btree (md5);
CREATE INDEX index_posts_on_mpixels ON posts USING btree (((((image_width * image_height))::numeric / 1000000.0)));
--
-- Name: index_posts_on_parent_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_posts_on_parent_id ON posts USING btree (parent_id);
--
-- Name: index_posts_on_source; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2660,6 +2812,90 @@ CREATE INDEX index_posts_on_tags_index ON posts USING gin (tag_index);
CREATE INDEX index_posts_on_view_count ON posts USING btree (view_count);
--
-- Name: index_removed_posts_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_removed_posts_on_created_at ON removed_posts USING btree (created_at);
--
-- Name: index_removed_posts_on_file_size; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_removed_posts_on_file_size ON removed_posts USING btree (file_size);
--
-- Name: index_removed_posts_on_image_height; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_removed_posts_on_image_height ON removed_posts USING btree (image_height);
--
-- Name: index_removed_posts_on_image_width; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_removed_posts_on_image_width ON removed_posts USING btree (image_width);
--
-- Name: index_removed_posts_on_last_commented_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_removed_posts_on_last_commented_at ON removed_posts USING btree (last_commented_at);
--
-- Name: index_removed_posts_on_last_noted_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_removed_posts_on_last_noted_at ON removed_posts USING btree (last_noted_at);
--
-- Name: index_removed_posts_on_md5; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_removed_posts_on_md5 ON removed_posts USING btree (md5);
--
-- Name: index_removed_posts_on_mpixels; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_removed_posts_on_mpixels ON posts USING btree (((((image_width * image_height))::numeric / 1000000.0)));
--
-- Name: index_removed_posts_on_parent_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_removed_posts_on_parent_id ON removed_posts USING btree (parent_id);
--
-- Name: index_removed_posts_on_source; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_removed_posts_on_source ON removed_posts USING btree (source);
--
-- Name: index_removed_posts_on_tags_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_removed_posts_on_tags_index ON posts USING gin (tag_index);
--
-- Name: index_removed_posts_on_view_count; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_removed_posts_on_view_count ON removed_posts USING btree (view_count);
--
-- Name: index_tag_aliases_on_antecedent_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -2835,6 +3071,16 @@ CREATE TRIGGER trigger_posts_on_tag_index_update
EXECUTE PROCEDURE tsvector_update_trigger('tag_index', 'public.danbooru', 'tag_string', 'fav_string', 'pool_string', 'uploader_string', 'approver_string');
--
-- Name: trigger_removed_posts_on_tag_index_update; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER trigger_removed_posts_on_tag_index_update
BEFORE INSERT OR UPDATE ON removed_posts
FOR EACH ROW
EXECUTE PROCEDURE tsvector_update_trigger('tag_index', 'public.danbooru', 'tag_string', 'fav_string', 'pool_string', 'uploader_string', 'approver_string');
--
-- Name: trigger_wiki_pages_on_update; Type: TRIGGER; Schema: public; Owner: -
--
@@ -2911,4 +3157,6 @@ INSERT INTO schema_migrations (version) VALUES ('20100307073438');
INSERT INTO schema_migrations (version) VALUES ('20100309211553');
INSERT INTO schema_migrations (version) VALUES ('20100318213503');
INSERT INTO schema_migrations (version) VALUES ('20100318213503');
INSERT INTO schema_migrations (version) VALUES ('20100818180317');