create table acl_class( id bigint identity not null primary key, class varchar (100) not null, constraint unique_uk_2 unique(class) ); create table acl_sid( id bigint identity not null primary key, principal integer not null, sid varchar (100) not null, constraint unique_uk_1 unique(sid,principal) ); create table acl_object_identity( id bigint identity not null primary key, object_id_class bigint not null, object_id_identity bigint not null, parent_object bigint, owner_sid bigint, entries_inheriting integer not null, constraint unique_uk_3 unique(object_id_class,object_id_identity), constraint foreign_fk_1 foreign key(parent_object)references acl_object_identity(id), constraint foreign_fk_2 foreign key(object_id_class)references acl_class(id), constraint foreign_fk_3 foreign key(owner_sid)references acl_sid(id) ); create table acl_entry( id bigint identity not null primary key, acl_object_identity bigint not null, ace_order int not null, sid bigint not null, mask integer not null, granting integer not null, audit_success integer not null, audit_failure integer not null, constraint unique_uk_4 unique(acl_object_identity,ace_order), constraint foreign_fk_4 foreign key(acl_object_identity) references acl_object_identity(id), constraint foreign_fk_5 foreign key(sid) references acl_sid(id) ); SET IDENTITY_INSERT acl_class ON INSERT INTO acl_class (id,class) VALUES(1,'com.forgon.oa.po.publicinformation.PublicInformation') INSERT INTO acl_class (id,class) VALUES(2,'com.forgon.oa.po.composefile.ComposeFile') INSERT INTO acl_class (id,class) VALUES(3,'com.forgon.networkdisk.po.FolderNode') INSERT INTO acl_class (id,class) VALUES(4,'com.forgon.networkdisk.po.FileNode') SET IDENTITY_INSERT acl_class OFF SET IDENTITY_INSERT acl_sid ON INSERT INTO acl_sid (id,principal,sid) VALUES(1,1,'thadmin') INSERT INTO acl_sid (id,principal,sid) VALUES(2,1,'mike') INSERT INTO acl_sid (id,principal,sid) VALUES(3,1,'marry') INSERT INTO acl_sid (id,principal,sid) VALUES(4,0,'ROLE_ADMINISTRATOR') INSERT INTO acl_sid (id,principal,sid) VALUES(5,0,'ROLE_USER') INSERT INTO acl_sid (id,principal,sid) VALUES(6,0,'ROLE_INFOMANAGER') SET IDENTITY_INSERT acl_sid OFF