create table jboss/jbp_users (
jbp_uid INTEGER NOT NULL ,
jbp_root_pref_set_id INTEGER unique,
jbp_uname VARCHAR(255) unique,
jbp_givenname VARCHAR(255),
jbp_familyname VARCHAR(255),
jbp_password VARCHAR(255),
jbp_realemail VARCHAR(255),
jbp_fakeemail VARCHAR(255),
jbp_regdate timestamp,
jbp_viewrealemail char(1),
jbp_enabled char(1),
primary key (jbp_uid)
)
create table jboss/jbp_role_membership (
jbp_rid INTEGER not null,
jbp_uid INTEGER not null,
primary key (jbp_uid, jbp_rid)
)
create table jboss/jbp_user_pref (
jbp_id INTEGER NOT NULL ,
jbp_name VARCHAR(255) not null,
jbp_type INTEGER,
jbp_set_id INTEGER,
primary key (jbp_id)
)
create table jboss/jbp_user_pref_set (
jbp_id INTEGER NOT NULL ,
jbp_parent_id INTEGER,
name VARCHAR(255) not null,
primary key (jbp_id)
)
create table jboss/jbp_user_pref_prop_value (
jbp_prop_id INTEGER not null,
jbp_value VARCHAR(255),
jbp_idx INTEGER not null,
primary key (jbp_prop_id, jbp_idx)
)
create table jboss/jbp_roles (
jbp_rid INTEGER NOT NULL ,
jbp_name VARCHAR(255) unique,
jbp_displayname VARCHAR(255) unique,
primary key (jbp_rid)
)
create table jboss/jbp_user_prop (
jbp_uid INTEGER not null,
jbp_value VARCHAR(255),
jbp_name VARCHAR(255) not null,
primary key (jbp_uid, jbp_name)
)
create index jboss/jbp_usersl1
on jboss/jbp_users(jbp_root_pref_set_id)
create index jboss/jbp_role_membershipl1
on jboss/jbp_role_membership(jbp_rid)
create index jboss/jbp_role_membershipl2
on jboss/jbp_role_membership(jbp_uid)
create index jboss/jbp_user_prefl1
on jboss/jbp_user_pref(jbp_set_id)
create index jboss/jbp_user_pref_setl1
on jboss/jbp_user_pref_set(jbp_parent_id)
create index jboss/jbp_user_pref_prop_valuel1
on jboss/jbp_user_pref_prop_value(jbp_prop_id)
create index jboss/jbp_user_propl1
on jboss/jbp_user_prop(jbp_uid)
ALTER TABLE jboss/jbp_users ADD CONSTRAINT jbp_users_c1 FOREIGN KEY (jbp_root_pref_set_id)
REFERENCES jboss/jbp_user_pref_set(jbp_id)
ALTER TABLE jboss/jbp_role_membership ADD CONSTRAINT jbp_role_membership_c1 FOREIGN KEY (jbp_rid)
REFERENCES jboss/jbp_roles (jbp_rid)
ALTER TABLE jboss/jbp_role_membership ADD CONSTRAINT jbp_role_membership_c2 FOREIGN KEY (jbp_uid)
REFERENCES jboss/jbp_users (jbp_uid)
ALTER TABLE jboss/jbp_user_pref ADD CONSTRAINT jbp_user_pref_c1 FOREIGN KEY (jbp_set_id)
REFERENCES jboss/jbp_user_pref_set (jbp_id)
ALTER TABLE jboss/jbp_user_pref_set ADD CONSTRAINT jbp_user_pref_set_c1 FOREIGN KEY (jbp_parent_id)
REFERENCES jboss/jbp_user_pref_set (jbp_id)
ALTER TABLE jboss/jbp_user_pref_prop_value ADD CONSTRAINT jbp_user_pref_prop_value_c1 FOREIGN KEY (jbp_prop_id)
REFERENCES jboss/jbp_user_pref (jbp_id)
ALTER TABLE jboss/jbp_user_prop ADD CONSTRAINT jbp_user_prop_c1 FOREIGN KEY (jbp_uid)
REFERENCES jboss/jbp_users (jbp_uid)
insert into jboss/jbp_users (jbp_uid, jbp_uname, jbp_password,
jbp_realemail, jbp_regdate, jbp_viewrealemail, jbp_enabled) values
(1, 'admin', 'admin', 'portal@example.com',
current_timestamp, '1', '1')
insert into jboss/jbp_users (jbp_uid, jbp_uname, jbp_password, jbp_realemail, jbp_regdate, jbp_viewrealemail, jbp_enabled) values (2, 'user', 'user', 'portal@example.com', current_timestamp, '1', '1');
insert into jboss/jbp_roles (jbp_rid, jbp_name, jbp_displayname) values (1, 'Admins', 'Administrators');
insert into jboss/jbp_roles (jbp_rid, jbp_name, jbp_displayname) values (2, 'Users', 'Users');
insert into jboss/jbp_role_membership (jbp_uid, jbp_rid) values (1, 1);
insert into jboss/jbp_role_membership (jbp_uid, jbp_rid) values (2, 2);
Wednesday, March 30, 2005
Subscribe to:
Post Comments (Atom)
Popular Posts
- Linux Forum: Apache, Webmin and Mandrake - Linux Operating System Help
- Yahoo! Mail: Revenge of the Oddpost
- Free AS400 & iSeries Software Tools & Utilities Downloads
- Fast-track your Web apps with Ruby on Rails
- The Laughing Boardroom video...a real world example!
- Basic Requirements of a JavaServer Faces Application
- UDATE and *DATE in AS400 RPG
- IBM eServer iSeries - The Laughing Boardroom
- Creating an as400 Query
- AS400 APIs
No comments:
Post a Comment