text: create table ACT_ID_GROUP (
      ID_ nvarchar(64),
      REV_ int,
      NAME_ nvarchar(255),
      TYPE_ nvarchar(255),
      primary key (ID_)
  );
  
  create table ACT_ID_MEMBERSHIP (
      USER_ID_ nvarchar(64),
      GROUP_ID_ nvarchar(64),
      primary key (USER_ID_, GROUP_ID_)
  );
  
  create table ACT_ID_USER (
      ID_ nvarchar(64),
      REV_ int,
      FIRST_ nvarchar(255),
      LAST_ nvarchar(255),
      EMAIL_ nvarchar(255),
      PWD_ nvarchar(255),
      SALT_ nvarchar(255),
      PICTURE_ID_ nvarchar(64),
      primary key (ID_)
  );
  
  create table ACT_ID_INFO (
      ID_ nvarchar(64),
      REV_ int,
      USER_ID_ nvarchar(64),
      TYPE_ nvarchar(64),
      KEY_ nvarchar(255),
      VALUE_ nvarchar(255),
      PASSWORD_ image,
      PARENT_ID_ nvarchar(255),
      primary key (ID_)
  );
  
  create table ACT_ID_TENANT (
      ID_ nvarchar(64),
      REV_ int,
      NAME_ nvarchar(255),
      primary key (ID_)
  );
  
  create table ACT_ID_TENANT_MEMBER (
      ID_ nvarchar(64) not null,
      TENANT_ID_ nvarchar(64) not null,
      USER_ID_ nvarchar(64),
      GROUP_ID_ nvarchar(64),
      primary key (ID_)
  );
  
  alter table ACT_ID_MEMBERSHIP
      add constraint ACT_FK_MEMB_GROUP
      foreign key (GROUP_ID_)
      references ACT_ID_GROUP (ID_);
  
  alter table ACT_ID_MEMBERSHIP
      add constraint ACT_FK_MEMB_USER
      foreign key (USER_ID_)
      references ACT_ID_USER (ID_);
  
  alter table ACT_ID_TENANT_MEMBER
      add constraint ACT_FK_TENANT_MEMB
      foreign key (TENANT_ID_)
      references ACT_ID_TENANT (ID_);
  
  alter table ACT_ID_TENANT_MEMBER
      add constraint ACT_FK_TENANT_MEMB_USER
      foreign key (USER_ID_)
      references ACT_ID_USER (ID_);
  
  alter table ACT_ID_TENANT_MEMBER
      add constraint ACT_FK_TENANT_MEMB_GROUP
      foreign key (GROUP_ID_)
      references ACT_ID_GROUP (ID_);
  
  create unique index ACT_UNIQ_TENANT_MEMB_USER on ACT_ID_TENANT_MEMBER (TENANT_ID_, USER_ID_) where USER_ID_ is not null;
  create unique index ACT_UNIQ_TENANT_MEMB_GROUP on ACT_ID_TENANT_MEMBER (TENANT_ID_, GROUP_ID_) where GROUP_ID_ is not null;
  