~ttx/openldap/lucid-gssapi-495418

« back to all changes in this revision

Viewing changes to servers/slapd/back-sql/rdbms_depend/ibmdb2/backsql_create.sql

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2008-07-10 14:45:49 UTC
  • Revision ID: james.westby@ubuntu.com-20080710144549-wck73med0e72gfyo
Tags: upstream-2.4.10
ImportĀ upstreamĀ versionĀ 2.4.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table ldap_oc_mappings;
 
2
create table ldap_oc_mappings
 
3
 (
 
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
        create_keyval varchar(255),
 
10
        delete_proc varchar(255),
 
11
        expect_return integer not null
 
12
);
 
13
 
 
14
drop table ldap_attr_mappings;
 
15
create table ldap_attr_mappings
 
16
 (
 
17
        id integer not null primary key,
 
18
        oc_map_id integer not null references ldap_oc_mappings(id),
 
19
        name varchar(255) not null,
 
20
        sel_expr varchar(255) not null,
 
21
        sel_expr_u varchar(255),
 
22
        from_tbls varchar(255) not null,
 
23
        join_where varchar(255),
 
24
        add_proc varchar(255),
 
25
        delete_proc varchar(255),
 
26
        param_order integer not null,
 
27
        expect_return integer not null
 
28
);
 
29
 
 
30
drop table ldap_entries;
 
31
create table ldap_entries
 
32
 (
 
33
        id integer not null primary key,
 
34
        dn varchar(255) not null,
 
35
        oc_map_id integer not null references ldap_oc_mappings(id),
 
36
        parent int NOT NULL ,
 
37
        keyval int NOT NULL 
 
38
);
 
39
 
 
40
alter table ldap_entries add 
 
41
        constraint unq1_ldap_entries unique
 
42
        (
 
43
                oc_map_id,
 
44
                keyval
 
45
        );  
 
46
 
 
47
alter table ldap_entries add
 
48
        constraint unq2_ldap_entries unique
 
49
        (
 
50
                dn
 
51
        );  
 
52
 
 
53
drop table ldap_entry_objclasses;
 
54
create table ldap_entry_objclasses
 
55
 (
 
56
        entry_id integer not null references ldap_entries(id),
 
57
        oc_name varchar(64)
 
58
 );
 
59