1 drop table ldap_oc_mappings;
2 create table ldap_oc_mappings
4 id integer not null primary key,
5 name varchar(64) not null,
6 keytbl varchar(64) not null,
7 keycol varchar(64) not null,
8 create_proc varchar(255),
9 delete_proc varchar(255),
10 expect_return int not null
13 drop table ldap_attr_mappings;
14 create table ldap_attr_mappings
16 id integer not null primary key,
17 oc_map_id integer not null references ldap_oc_mappings(id),
18 name varchar(255) not null,
19 sel_expr varchar(255) not null,
20 sel_expr_u varchar(255),
21 from_tbls varchar(255) not null,
22 join_where varchar(255),
23 add_proc varchar(255),
24 delete_proc varchar(255),
25 param_order int not null,
26 expect_return int not null
29 drop table ldap_entries;
30 create table ldap_entries
32 id integer not null primary key,
33 dn varchar(255) not null,
34 oc_map_id integer not null references ldap_oc_mappings(id),
37 UNIQUE ( oc_map_id, keyval ),
41 drop table ldap_referrals;
42 create table ldap_referrals
44 entry_id integer not null references ldap_entries(id),
48 drop table ldap_entry_objclasses;
49 create table ldap_entry_objclasses
51 entry_id integer not null references ldap_entries(id),
55 ----- Apparently PostgreSQL 7.0 does not know concat(); however,
56 ----- back-sql can be configured to use '||' for string concatenation.
57 ----- Those who can't live without concat() can uncomment this:
58 -- drop function concat(text, text);
59 -- create function concat(text, text) returns text as 'select $1 || $2;' language 'sql';