BEGIN TRANSACTION;

------------------------------------------------
-- objectClass  mappings 
------------------------------------------------
-- The root directory dcObject
insert into ldap_oc_mappings (id,name,keytbl,keycol,create_proc,delete_proc,expect_return) values (1,'dcObject','dc_object','id',NULL,NULL,0);

-- The organizationalUnit objectClass
insert into ldap_oc_mappings (id,name,keytbl,keycol,create_proc,delete_proc,expect_return) values (2,'organizationalUnit','organizational_unit','id',NULL,NULL,0);

-- The samseOu objectClass
insert into ldap_oc_mappings (id,name,keytbl,keycol,create_proc,delete_proc,expect_return) values (3,'samseOu','samse_ou','id','select create_samse_ou()','select delete_samse_ou(?)',0);

-- The posixGroup objectClass
insert into ldap_oc_mappings (id,name,keytbl,keycol,create_proc,delete_proc,expect_return) values (4,'posixGroup','posix_group','id','select create_posix_group()','select delete_posix_group(?)',0);

-- The samsePerson objectClass
insert into ldap_oc_mappings (id,name,keytbl,keycol,create_proc,delete_proc,expect_return)
values (5,'samsePerson','samse_person','id','SELECT create_samse_person()','SELECT delete_samse_person(?)',0);

SELECT setval ('ldap_oc_mappings_id_seq', 5, false);

SELECT setval ('samse_ou_id_seq', 1, false);

SELECT setval ('posix_group_id_seq', 1, false);


------------------------------------------------
-- attributes mappings
------------------------------------------------
-- dcObject's attributes
insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (1,1,'dc','dc_object.dc','dc_object',NULL,NULL,NULL,3,0);

-- organizationalUnit's attributes
insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (2,2,'ou','organizational_unit.ou','organizational_unit',NULL,NULL,NULL,3,0);

-- samseOu's attributes
insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (3,3,'uid','samse_ou.uid','samse_ou',NULL,'{ call set_samse_ou_uid(?,?) }',NULL,3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (4,3,'ou','samse_ou.ou','samse_ou',NULL,'{ call set_samse_ou_ou(?,?) }',NULL,3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (5,3,'capital','samse_ou.capital','samse_ou',NULL,'{ call set_samse_ou_capital(?,?) }','{ call del_samse_ou_capital(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (6,3,'legalForm','samse_ou.legalform','samse_ou',NULL,'{ call set_samse_ou_legalform(?,?) }','{ call del_samse_ou_legalform(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (7,3,'collectiveConvention','samse_ou.collectiveconvention','samse_ou',NULL,'{ call set_samse_ou_collectiveconv(?,?) }','{ call del_samse_ou_collectiveconv(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (8,3,'description','samse_ou.description','samse_ou',NULL,'{ call set_samse_ou_description(?,?) }','{ call del_samse_ou_description(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (9,3,'responsable','samse_ou.responsable','samse_ou',NULL,'{ call set_samse_ou_responsable(?,?) }','{ call del_samse_ou_responsable(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (10,3,'quality','samse_ou.quality','samse_ou',NULL,'{ call set_samse_ou_quality(?,?) }','{ call del_samse_ou_quality(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (11,3,'internationaliSDNNumber','samse_ou.internationalisdnnumber','samse_ou',NULL,'{ call set_samse_ou_internationalisdn(?,?) }','{ call del_samse_ou_internationalisdn(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (12,3,'businessCategory','samse_ou.businesscategory','samse_ou',NULL,'{ call set_samse_ou_businesscategory(?,?) }','{ call del_samse_ou_businesscategory(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (13,3,'telephoneNumber','samse_ou.telephonenumber','samse_ou',NULL,'{ call set_samse_ou_telephonenumber(?,?) }','{ call del_samse_ou_telephonenumber(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (14,3,'facsimileTelephoneNumber','samse_ou.facsimiletelephonenumber','samse_ou',NULL,'{ call set_samse_ou_fax(?,?) }','{ call del_samse_ou_fax(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (15,3,'street','samse_ou.street','samse_ou',NULL,'{ call set_samse_ou_street(?,?) }','{ call del_samse_ou_street(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (16,3,'postOfficeBox','samse_ou.postofficebox','samse_ou',NULL,'{ call set_samse_ou_postofficebox(?,?) }','{ call del_samse_ou_postofficebox(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (17,3,'postalCode','samse_ou.postalcode','samse_ou',NULL,'{ call set_samse_ou_postalcode(?,?) }','{ call del_samse_ou_postalcode(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (18,3,'l','samse_ou.l','samse_ou',NULL,'{ call set_samse_ou_l(?,?) }','{ call del_samse_ou_l(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (19,3,'region','samse_ou.region','samse_ou',NULL,'{ call set_samse_ou_region(?,?) }','{ call del_samse_ou_region(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (20,3,'rpvNumber','samse_ou.rpvnumber','samse_ou',NULL,'{ call set_samse_ou_rpvnumber(?,?) }','{ call del_samse_ou_rpvnumber(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (21,3,'companyNumber','samse_ou.companynumber','samse_ou',NULL,'{ call set_samse_ou_companynumber(?,?) }','{ call del_samse_ou_companynumber(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (22,3,'agencyShield','samse_ou.agencyshield','samse_ou',NULL,'{ call set_samse_ou_agencyshield(?,?) }','{ call del_samse_ou_agencyshield(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (23,3,'mailDomain','samse_ou.maildomain','samse_ou',NULL,'{ call set_samse_ou_maildomain(?,?) }','{ call del_samse_ou_maildomain(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (24,3,'codeApe','samse_ou.codeape','samse_ou',NULL,'{ call set_samse_ou_codeape(?,?) }','{ call del_samse_ou_codeape(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (25,3,'realSite','samse_ou.realsite','samse_ou',NULL,'{ call set_samse_ou_realsite(?,?) }','{ call del_samse_ou_realsite(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (26,3,'codeLidis','samse_ou.codelidis','samse_ou',NULL,'{ call set_samse_ou_codelidis(?,?) }','{ call del_samse_ou_codelidis(?,?) }',3,0);
SELECT setval ('ldap_attr_mappings_id_seq', 26, false);

-- posixGroup's attributes
insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (27,4,'cn','posix_group.cn','posix_group',NULL,'{ call set_posix_group_cn(?,?) }',NULL,3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (28,4,'gidnumber','posix_group.gidnumber','posix_group',NULL,'{ call set_posix_group_gidnumber(?,?) }',NULL,3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (29,4,'memberUid','group_member.memberuid','group_member,posix_group','group_member.group_id=posix_group.id','{ call set_group_member_memberuid(?,?) }','{ call del_group_member_memberuid(?,?) }',3,0);

-- samsePerson's attributes

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (30,5,'ou','samse_person.ou','samse_person',NULL,'{ call set_samse_person_ou(?,?) }',NULL,3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (31,5,'employeeNumber','samse_person.employeenumber','samse_person',NULL,'{ call set_samse_person_employeenumber(?,?) }',NULL,3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (32,5,'uid','samse_person.uid','samse_person',NULL,'{ call set_samse_person_uid(?,?) }',NULL,3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (33,5,'cn','samse_person.cn','samse_person',NULL,'{ call set_samse_person_cn(?,?) }','{ call del_samse_person_cn(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (34,5,'sn','samse_person.sn','samse_person',NULL,'{ call set_samse_person_sn(?,?) }','{ call del_samse_person_sn(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (36,5,'givenName','samse_person.givenname','samse_person',NULL,'{ call set_samse_person_givenname(?,?) }','{ call del_samse_person_givenname(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (37,5,'displayName','samse_person.displayname','samse_person',NULL,'{ call set_samse_person_displayname(?,?) }','{ call del_samse_person_displayname(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (38,5,'mail','samse_person.mail','samse_person',NULL,'{ call set_samse_person_mail(?,?) }','{ call del_samse_person_mail(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (39,5,'mailboxName','samse_person.mailboxname','samse_person',NULL,'{ call set_samse_person_mailboxname(?,?) }','{ call del_samse_person_mailboxname(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (40,5,'title','samse_person.title','samse_person',NULL,'{ call set_samse_person_title(?,?) }','{ call del_samse_person_title(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (41,5,'employeeType','samse_person.employeetype','samse_person',NULL,'{ call set_samse_person_employeetype(?,?) }','{ call del_samse_person_employeetype(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (42,5,'departmentNumber','samse_person.departmentnumber','samse_person',NULL,'{ call set_samse_person_departmentnum(?,?) }','{ call del_samse_person_departmentnum(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (43,5,'arrivalDate','samse_person.arrivaldate','samse_person',NULL,'{ call set_samse_person_arrivaldate(?,?) }','{ call del_samse_person_arrivaldate(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (44,5,'birthDate','samse_person.birthdate','samse_person',NULL,'{ call set_samse_person_birthdate(?,?) }','{ call del_samse_person_birthdate(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (46,5,'leavingDate','samse_person.leavingdate','samse_person',NULL,'{ call set_samse_person_leavingdate(?,?) }','{ call del_samse_person_leavingdate(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (47,5,'contributionGroup','samse_person.contributiongroup','samse_person',NULL,'{ call set_samse_person_contribgroup(?,?) }','{ call del_samse_person_contribgroup(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (48,5,'userPassword','samse_person.userpassword','samse_person',NULL,'{ call set_samse_person_userpassword(?,?) }','{ call del_samse_person_userpassword(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (49,5,'loginShell','samse_person.loginshell','samse_person',NULL,'{ call set_samse_person_loginshell(?,?) }','{ call del_samse_person_loginshell(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (50,5,'uidNumber','samse_person.uidnumber','samse_person',NULL,'{ call set_samse_person_uidnumber(?,?) }','{ call del_samse_person_uidnumber(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (51,5,'gidNumber','samse_person.gidnumber','samse_person',NULL,'{ call set_samse_person_gidnumber(?,?) }','{ call del_samse_person_gidnumber(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (52,5,'homeDirectory','samse_person.homedirectory','samse_person',NULL,'{ call set_samse_person_homedirectory(?,?) }','{ call del_samse_person_homedirectory(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (53,5,'shadowLastChange','samse_person.shadowlastchange','samse_person',NULL,'{ call set_samse_person_shadowlastchg(?,?) }','{ call del_samse_person_shadowlastchg(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (54,5,'shadowMin','samse_person.shadowmin','samse_person',NULL,'{ call set_samse_person_shadowmin(?,?) }','{ call del_samse_person_shadowmin(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (55,5,'shadowMax','samse_person.shadowmax','samse_person',NULL,'{ call set_samse_person_shadowmax(?,?) }','{ call del_samse_person_shadowmax(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (56,5,'shadowWarning','samse_person.shadowwarning','samse_person',NULL,'{ call set_samse_person_shadowwarning(?,?) }','{ call del_samse_person_shadowwarning(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (57,5,'telephoneNumber','samse_person.telephonenumber','samse_person',NULL,'{ call set_samse_person_phonenumber(?,?) }','{ call del_samse_person_telephonenumber(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (58,5,'fixRPVNumber','samse_person.fixrpvnumber','samse_person',NULL,'{ call set_samse_person_fixrpvnumber(?,?) }','{ call del_samse_person_fixrpvnumber(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (59,5,'mobile','samse_person.mobile','samse_person',NULL,'{ call set_samse_person_mobile(?,?) }','{ call del_samse_person_mobile(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (60,5,'mobileRPVNumber','samse_person.mobilerpvnumber','samse_person',NULL,'{ call set_samse_person_mobilerpvnum(?,?) }','{ call del_samse_person_mobilerpvnum(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (61,5,'assistant','samse_person.assistant','samse_person',NULL,'{ call set_samse_person_assistant(?,?) }','{ call del_samse_person_assistant(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (62,5,'sexe','samse_person.sexe','samse_person',NULL,'{ call set_samse_person_sexe(?,?) }','{ call del_samse_person_sexe(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (63,5,'codeEmploi','samse_person.codeemploi','samse_person',NULL,'{ call set_samse_person_codeemploi(?,?) }','{ call del_samse_person_codeemploi(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (64,5,'codeAgence','samse_person.codeagence','samse_person',NULL,'{ call set_samse_person_codeagence(?,?) }','{ call del_samse_person_codeagence(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (65,5,'fonction','samse_person.fonction','samse_person',NULL,'{ call set_samse_person_fonction(?,?) }','{ call del_samse_person_fonction(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (66,5,'activite','samse_activite.activite','samse_activite,samse_person','samse_activite.person_id=samse_person.id','{ call set_samse_activite_activite(?,?) }','{ call del_samse_activite_activite(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (67,5,'shadowExpire','samse_person.shadowexpire','samse_person',NULL,'{ call set_samse_person_shadowexpire(?,?) }','{ call del_samse_person_shadowexpire(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (68,5,'service','samse_person.service','samse_person',NULL,'{ call set_samse_person_service(?,?) }','{ call del_samse_person_service(?,?) }',3,0);

insert into ldap_attr_mappings
(id,oc_map_id,name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return)
values (69,5,'typeRTT','samse_person.typertt','samse_person',NULL,'{ call set_samse_person_typertt(?,?) }','{ call del_samse_person_typertt(?,?) }',3,0);


-- Entries

-- Insert the root directory dcObject
insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values (1, 'dc=samse,dc=fr',1,0,1);
insert into dc_object (id,dc) values (1,'samse');
SELECT setval ('dc_object_id_seq', 1, false);

-- Insert all organizationalUnit objects
insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values (2, 'ou=company,dc=samse,dc=fr',2,1,1);
insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values (3, 'ou=region,dc=samse,dc=fr',2,1,2);
insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values (4, 'ou=agency,dc=samse,dc=fr',2,1,3);
insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values (5, 'ou=people,dc=samse,dc=fr',2,1,4);
insert into ldap_entries (id,dn,oc_map_id,parent,keyval) values (6, 'ou=group,dc=samse,dc=fr',2,1,5);
SELECT setval ('ldap_entries_id_seq', 6, false);

-- referrals

insert into ldap_entry_objclasses (entry_id,oc_name) values (1,'referral');

insert into ldap_referrals (entry_id,url) values (1,'ldap://localhost/');

END TRANSACTION;
