mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-27 03:20:22 +08:00
e90ef57645
including: - fixes according to new API changes - closing db connection in connection_destroy callback, not unbind - support of new schema code, samples changed accordingly - support for multiple objectclasses (to distinguish from unique objectclass-to-tables mapping) - auto 'ref' attribute support - samples now include illustrations of using these 2 features to make named referrals as described in ldapext-namedref draft more to come: - documentation update - different improvements to be more close to native directory (after beta?)
67 lines
995 B
SQL
67 lines
995 B
SQL
drop table if exists persons;
|
|
CREATE TABLE persons (
|
|
id int NOT NULL,
|
|
name varchar(255) NOT NULL
|
|
);
|
|
|
|
drop table if exists institutes;
|
|
CREATE TABLE institutes (
|
|
id int NOT NULL,
|
|
name varchar(255)
|
|
);
|
|
|
|
drop table if exists documents;
|
|
CREATE TABLE documents (
|
|
id int NOT NULL,
|
|
title varchar(255) NOT NULL,
|
|
abstract varchar(255)
|
|
);
|
|
|
|
drop table if exists authors_docs;
|
|
CREATE TABLE authors_docs (
|
|
pers_id int NOT NULL,
|
|
doc_id int NOT NULL
|
|
);
|
|
|
|
drop table if exists phones;
|
|
CREATE TABLE phones (
|
|
id int NOT NULL ,
|
|
phone varchar(255) NOT NULL ,
|
|
pers_id int NOT NULL
|
|
);
|
|
|
|
|
|
|
|
ALTER TABLE authors_docs ADD
|
|
CONSTRAINT PK_authors_docs PRIMARY KEY
|
|
(
|
|
pers_id,
|
|
doc_id
|
|
);
|
|
|
|
ALTER TABLE documents ADD
|
|
CONSTRAINT PK_documents PRIMARY KEY
|
|
(
|
|
id
|
|
);
|
|
|
|
ALTER TABLE institutes ADD
|
|
CONSTRAINT PK_institutes PRIMARY KEY
|
|
(
|
|
id
|
|
);
|
|
|
|
|
|
ALTER TABLE persons ADD
|
|
CONSTRAINT PK_persons PRIMARY KEY
|
|
(
|
|
id
|
|
);
|
|
|
|
ALTER TABLE phones ADD
|
|
CONSTRAINT PK_phones PRIMARY KEY
|
|
(
|
|
id
|
|
);
|
|
|