Changeset 1643
- Timestamp:
- 12/09/11 08:21:28 (12 years ago)
- Location:
- ComponentRegistry/branches/jeaferversion/ComponentRegistry/src/main/sql
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/branches/jeaferversion/ComponentRegistry/src/main/sql/create.sql
r1633 r1643 22 22 CREATE TABLE comments 23 23 ( 24 comment_id integer NOT NULL DEFAULT nextval('comments_id_seq'::regclass),24 id SERIAL NOT NULL, 25 25 comments text NOT NULL, 26 26 comment_date timestamp with time zone, -
ComponentRegistry/branches/jeaferversion/ComponentRegistry/src/main/sql/upgrade-1.10.sql
r1602 r1643 3 3 --- the component registry REST service versions 1.10 and up. 4 4 --- 5 --- Apply only when upgrading from an existing version lower than 1.10 6 --- 5 --- Apply only when upgrading from an existing version lower than 1.11 7 6 7 DROP TABLE comments; 8 8 alter table profile_description add column show_in_editor boolean DEFAULT true NOT NULL; 9 10 CREATE TABLE comments 11 ( 12 id SERIAL NOT NULL, 13 comments text NOT NULL, 14 comment_date timestamp with time zone NOT NULL, 15 profile_description_id character varying, 16 component_description_id character varying, 17 user_id integer NOT NULL 18 19 ); 20 21 22 CREATE INDEX fki_comments_fk_user ON comments USING btree (user_id); 23 CREATE INDEX fki_comments_profile_id ON comments USING btree (profile_description_id); 24 CREATE INDEX fki_comments_component_id ON comments USING btree (component_description_id); 25 ALTER TABLE ONLY comments ADD CONSTRAINT comments_id_pkey PRIMARY KEY(id); 26 ALTER TABLE ONLY comments ADD CONSTRAINT comments_user FOREIGN KEY (user_id) REFERENCES registry_user(id); 27 ALTER TABLE ONLY comments ADD CONSTRAINT comments_profile_id FOREIGN KEY (profile_description_id) REFERENCES profile_description(profile_id); 28 ALTER TABLE ONLY comments ADD CONSTRAINT comments_component_id FOREIGN KEY (component_description_id) REFERENCES component_description(component_id);
Note: See TracChangeset
for help on using the changeset viewer.