openldap/servers/slapd/back-sql/rdbms_depend/oracle/create.sql
Dmitry Kovalev b8af4a67ea Summary of changes:
- filter -> SQL translation bugfixes
- several memory leaks fixups
- improved configurability:
    - allows definition of  uppercasing function to support CIS matching on databases that do
    case sensitive compares (this fixes up Oracle issues, example updated)
    - allows more flexibility in stored procedures interface (different parameter order, optional return
      codes - see samples, and comments in backsql.h)
- synchronize function interfaces to recent changes in prototypes ("const" clauses etc.) made for all backends
  (those changes led to compile-time errors)
2000-05-26 16:03:32 +00:00

80 lines
1.4 KiB
SQL

CREATE TABLE ldap_attrs (
id NUMBER NOT NULL,
oc_id NUMBER NOT NULL,
name varchar2(255) NOT NULL,
sel_expr varchar2(255) NOT NULL,
from_tbls varchar2(255) NOT NULL,
join_where varchar2(255),
add_proc varchar2(255),
modify_proc varchar2(255),
delete_proc varchar2(255),
param_order NUMBER NOT NULL,
expect_return NUMBER NOT NULL
);
CREATE TABLE ldap_entries (
id NUMBER NOT NULL ,
dn varchar2(255) NOT NULL ,
objclass NUMBER NOT NULL ,
parent NUMBER NOT NULL ,
keyval NUMBER NOT NULL
);
CREATE TABLE ldap_objclasses (
id NUMBER NOT NULL ,
name varchar2(64) NOT NULL ,
keytbl varchar2(64) NOT NULL ,
keycol varchar2(64) NOT NULL ,
create_proc varchar2(255),
delete_proc varchar2(255),
expect_return NUMBER NOT NULL
);
ALTER TABLE ldap_attrs ADD
CONSTRAINT PK_ldap_attrs PRIMARY KEY
(
id
);
ALTER TABLE ldap_entries ADD
CONSTRAINT PK_ldap_entries PRIMARY KEY
(
id
);
ALTER TABLE ldap_objclasses ADD
CONSTRAINT PK_ldap_objclasses PRIMARY KEY
(
id
);
ALTER TABLE ldap_entries ADD
CONSTRAINT UNQ1_ldap_entries UNIQUE
(
objclass,
keyval
);
ALTER TABLE ldap_entries ADD
CONSTRAINT UNQ2_ldap_entries UNIQUE
(
dn
);
ALTER TABLE ldap_objclasses ADD
CONSTRAINT UNQ_ldap_objclasses UNIQUE
(
name
);
CREATE SEQUENCE ldap_objclass_ids START WITH 1 INCREMENT BY 1;
CREATE SEQUENCE ldap_attr_ids START WITH 1 INCREMENT BY 1;
CREATE SEQUENCE ldap_entry_ids START WITH 1 INCREMENT BY 1;