openldap/servers/slapd/back-sql/rdbms_depend/mssql/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
Transact-SQL

CREATE TABLE ldap_attrs (
id int IDENTITY (1, 1) NOT NULL ,
oc_id int NOT NULL ,
name varchar (255) NOT NULL ,
sel_expr varchar (255) NOT NULL ,
from_tbls varchar (255) NOT NULL ,
join_where varchar (255) NULL ,
add_proc varchar (255) NULL ,
modify_proc varchar (255) NULL ,
delete_proc varchar (255) NULL ,
param_order int NOT NULL,
expect_return int NOT NULL
)
GO
CREATE TABLE ldap_entries (
id int IDENTITY (1, 1) NOT NULL ,
dn varchar (255) NOT NULL ,
objclass int NOT NULL ,
parent int NOT NULL ,
keyval int NOT NULL
)
GO
CREATE TABLE ldap_objclasses (
id int IDENTITY (1, 1) NOT NULL ,
name varchar (64) NOT NULL ,
keytbl varchar (64) NOT NULL ,
keycol varchar (64) NOT NULL ,
create_proc varchar (255) NULL ,
delete_proc varchar (255) NULL,
expect_return int NOT NULL
)
GO
ALTER TABLE ldap_attrs WITH NOCHECK ADD
CONSTRAINT PK_ldap_attrs PRIMARY KEY
(
id
)
GO
ALTER TABLE ldap_entries WITH NOCHECK ADD
CONSTRAINT PK_ldap_entries PRIMARY KEY
(
id
)
GO
ALTER TABLE ldap_entries WITH NOCHECK ADD
CONSTRAINT UNQ1_ldap_entries UNIQUE
(
objclass,
keyval
)
GO
ALTER TABLE ldap_entries WITH NOCHECK ADD
CONSTRAINT UNQ2_ldap_entries UNIQUE
(
dn
)
GO
ALTER TABLE ldap_objclasses WITH NOCHECK ADD
CONSTRAINT PK_ldap_objclasses PRIMARY KEY
(
id
)
GO
ALTER TABLE ldap_objclasses WITH NOCHECK ADD
CONSTRAINT UNQ_ldap_objclasses UNIQUE
(
name
)
GO