| 1 |
create table ldap_oc_mappings ( |
| 2 |
id number not null , |
| 3 |
name varchar2(64) not null , |
| 4 |
keytbl varchar2(64) not null , |
| 5 |
keycol varchar2(64) not null , |
| 6 |
create_proc varchar2(255), |
| 7 |
delete_proc varchar2(255), |
| 8 |
expect_return number not null |
| 9 |
); |
| 10 |
|
| 11 |
alter table ldap_oc_mappings add |
| 12 |
constraint PK_ldap_oc_mappings primary key |
| 13 |
( |
| 14 |
id |
| 15 |
); |
| 16 |
|
| 17 |
alter table ldap_oc_mappings add |
| 18 |
constraint unq_ldap_oc_mappings unique |
| 19 |
( |
| 20 |
name |
| 21 |
); |
| 22 |
|
| 23 |
create table ldap_attr_mappings ( |
| 24 |
id number not null, |
| 25 |
oc_map_id number not null references ldap_oc_mappings(id), |
| 26 |
name varchar2(255) not null, |
| 27 |
sel_expr varchar2(255) not null, |
| 28 |
sel_expr_u varchar2(255), |
| 29 |
from_tbls varchar2(255) not null, |
| 30 |
join_where varchar2(255), |
| 31 |
add_proc varchar2(255), |
| 32 |
delete_proc varchar2(255), |
| 33 |
param_order number not null, |
| 34 |
expect_return number not null |
| 35 |
); |
| 36 |
|
| 37 |
alter table ldap_attr_mappings add |
| 38 |
constraint pk_ldap_attr_mappings primary key |
| 39 |
( |
| 40 |
id |
| 41 |
); |
| 42 |
|
| 43 |
|
| 44 |
create table ldap_entries ( |
| 45 |
id number not null , |
| 46 |
dn varchar2(255) not null , |
| 47 |
dn_ru varchar2(255), |
| 48 |
oc_map_id number not null references ldap_oc_mappings(id), |
| 49 |
parent number not null , |
| 50 |
keyval number not null |
| 51 |
); |
| 52 |
|
| 53 |
alter table ldap_entries add |
| 54 |
constraint PK_ldap_entries primary key |
| 55 |
( |
| 56 |
id |
| 57 |
); |
| 58 |
|
| 59 |
alter table ldap_entries add |
| 60 |
constraint unq1_ldap_entries unique |
| 61 |
( |
| 62 |
oc_map_id, |
| 63 |
keyval |
| 64 |
); |
| 65 |
|
| 66 |
alter table ldap_entries add |
| 67 |
constraint unq2_ldap_entries unique |
| 68 |
( |
| 69 |
dn |
| 70 |
); |
| 71 |
|
| 72 |
create sequence ldap_objclass_ids start with 1 increment by 1; |
| 73 |
|
| 74 |
create sequence ldap_attr_ids start with 1 increment by 1; |
| 75 |
|
| 76 |
create sequence ldap_entry_ids start with 1 increment by 1; |
| 77 |
|
| 78 |
create table ldap_referrals |
| 79 |
( |
| 80 |
entry_id number not null references ldap_entries(id), |
| 81 |
url varchar(1023) not null |
| 82 |
); |
| 83 |
|
| 84 |
create table ldap_entry_objclasses |
| 85 |
( |
| 86 |
entry_id number not null references ldap_entries(id), |
| 87 |
oc_name varchar(64) |
| 88 |
); |
| 89 |
|
| 90 |
quit |