tag unit test

This commit is contained in:
Albert Yi
2010-02-06 23:11:26 -05:00
parent 305f4d4607
commit 341a24e22e
8 changed files with 403 additions and 11 deletions

View File

@@ -24,6 +24,40 @@ CREATE TABLE schema_migrations (
);
--
-- Name: tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE tags (
id integer NOT NULL,
name character varying(255) NOT NULL,
post_count integer DEFAULT 0 NOT NULL,
category integer DEFAULT 0 NOT NULL,
related_tags text,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE tags_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
--
-- Name: tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE tags_id_seq OWNED BY tags.id;
--
-- Name: users; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
@@ -72,6 +106,13 @@ CREATE SEQUENCE users_id_seq
ALTER SEQUENCE users_id_seq OWNED BY users.id;
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE tags ALTER COLUMN id SET DEFAULT nextval('tags_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
@@ -79,6 +120,14 @@ ALTER SEQUENCE users_id_seq OWNED BY users.id;
ALTER TABLE users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
--
-- Name: tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY tags
ADD CONSTRAINT tags_pkey PRIMARY KEY (id);
--
-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
@@ -87,6 +136,13 @@ ALTER TABLE ONLY users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
--
-- Name: index_tags_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE UNIQUE INDEX index_tags_on_name ON tags USING btree (name);
--
-- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -112,4 +168,6 @@ CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (v
-- PostgreSQL database dump complete
--
INSERT INTO schema_migrations (version) VALUES ('20100204211522');
INSERT INTO schema_migrations (version) VALUES ('20100204211522');
INSERT INTO schema_migrations (version) VALUES ('20100205162521');