Changeset 1643


Ignore:
Timestamp:
12/09/11 08:21:28 (12 years ago)
Author:
jeafer
Message:

Jean-Charles branch ComponentRegistry commit6 (functionnal),
Changes regarding comment on the ComponentRegistry.

Create sql script and upgrade sql script updated for table comments

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  
    2222CREATE TABLE comments
    2323(
    24   comment_id integer NOT NULL DEFAULT nextval('comments_id_seq'::regclass),
     24  id SERIAL NOT NULL,
    2525  comments text NOT NULL,
    2626  comment_date timestamp with time zone,
  • ComponentRegistry/branches/jeaferversion/ComponentRegistry/src/main/sql/upgrade-1.10.sql

    r1602 r1643  
    33--- the component registry REST service versions 1.10 and up.
    44---
    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
    76
     7DROP TABLE comments;
    88alter table profile_description add column show_in_editor boolean DEFAULT true NOT NULL;
     9
     10CREATE 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
     22CREATE INDEX fki_comments_fk_user ON comments USING btree (user_id);
     23CREATE INDEX fki_comments_profile_id ON comments USING btree (profile_description_id);
     24CREATE INDEX fki_comments_component_id ON comments USING btree (component_description_id);
     25ALTER TABLE ONLY comments ADD CONSTRAINT comments_id_pkey PRIMARY KEY(id);
     26ALTER TABLE ONLY comments ADD CONSTRAINT comments_user FOREIGN KEY (user_id) REFERENCES registry_user(id);
     27ALTER TABLE ONLY comments ADD CONSTRAINT comments_profile_id FOREIGN KEY (profile_description_id) REFERENCES profile_description(profile_id);
     28ALTER 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.