Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

The following are the inserts used to demo the Add Role use case:

No Format

INSERT INTO prc_names (id, family_name, given_name)
 VALUES (prc_names_seq.NEXTVAL, 'Rock', 'Chris');

INSERT INTO prc_names (id, family_name, given_name)
 VALUES (prc_names_seq.NEXTVAL, 'Fey', 'Tina');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Affiliation', 'Faculty');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Department', 'Computer Science');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Affiliation', 'SAKAI Access');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Status', 'Active');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Status', 'InActive');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Phone', 'Cell');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Phone', 'Home');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Phone', 'Campus');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Address', 'Home');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Address', 'Campus');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'EmailAddress', 'Home');

INSERT INTO ctx_data_types (id,
data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'EmailAddress', 'Campus');

INSERT INTO prc_persons
   (id, date_of_birth, gender, official_name_id, preferred_name_id)
 (SELECT prc_persons_seq.NEXTVAL, TO_DATE('17-DEC-1980', 'DD-MON-YYYY'), 'M',
    n.id, n.id
      FROM prc_names n
        WHERE  n.family_name = 'Rock');

INSERT INTO prc_persons
   (id, date_of_birth, gender, official_name_id, preferred_name_id)
 (SELECT prc_persons_seq.NEXTVAL, TO_DATE('20-MAR-1975', 'DD-MON-YYYY'), 'F',
    n.id, n.id
      FROM prc_names n
        WHERE  n.family_name = 'Fey');

INSERT INTO drd_organizational_units
   (id, code, name, campus_id, organizational_unit_t)
 (SELECT drd_organizational_units_seq.NEXTVAL, 'CSI', 'Computer Science',
     c.id, dt.id
   FROM prd_campuses c, ctx_data_types dt
    WHERE c.code = '02'
     AND dt.data_type = 'Department' AND dt.description = 'Computer Science');

INSERT INTO prd_roles (prd_roles.id, code, title, affiliation_t, campus_id, organizational_unit_id)
 (SELECT prd_roles_seq.NEXTVAL, 'PRO', 'Professor', dt.id, d.campus_id, d.id
    FROM ctx_data_types dt, drd_organizational_units d
     WHERE dt.data_type = 'Affiliation' AND dt.description = 'Faculty'
      AND d.code = 'CSI');

INSERT INTO prd_roles (prd_roles.id, code, title, affiliation_t, campus_id, organizational_unit_id)
 (SELECT prd_roles_seq.NEXTVAL, 'SAK', 'SAKAI User', dt.id, d.campus_id, d.id
    FROM ctx_data_types dt, drd_organizational_units d
     WHERE dt.data_type = 'Affiliation' AND dt.description = 'SAKAI Access'
      AND d.code = 'CSI');