text: create table ACT_ID_PROPERTY (
      NAME_ varchar(64),
      VALUE_ varchar(300),
      REV_ integer,
      primary key (NAME_)
  );
  
  insert into ACT_ID_PROPERTY
  values ('schema.version', '6.5.1.5', 1);
  
  create table ACT_ID_BYTEARRAY (
      ID_ varchar(64),
      REV_ integer,
      NAME_ varchar(255),
      BYTES_ longvarbinary,
      primary key (ID_)
  );
  
  create table ACT_ID_GROUP (
    ID_ varchar(64),
    REV_ integer,
    NAME_ varchar(255),
    TYPE_ varchar(255),
    primary key (ID_)
  );
  
  create table ACT_ID_MEMBERSHIP (
    USER_ID_ varchar(64),
    GROUP_ID_ varchar(64),
    primary key (USER_ID_, GROUP_ID_)
  );
  
  create table ACT_ID_USER (
    ID_ varchar(64),
    REV_ integer,
    FIRST_ varchar(255),
    LAST_ varchar(255),
    DISPLAY_NAME_ varchar(255),
    EMAIL_ varchar(255),
    PWD_ varchar(255),
    PICTURE_ID_ varchar(64),
    TENANT_ID_ varchar(255) default '',
    primary key (ID_)
  );
  
  create table ACT_ID_INFO (
    ID_ varchar(64),
    REV_ integer,
    USER_ID_ varchar(64),
    TYPE_ varchar(64),
    KEY_ varchar(255),
    VALUE_ varchar(255),
    PASSWORD_ longvarbinary,
    PARENT_ID_ varchar(255),
    primary key (ID_)
  );
  
  create table ACT_ID_TOKEN (
      ID_ varchar(64) not null,
      REV_ integer,
      TOKEN_VALUE_ varchar(255),
      TOKEN_DATE_ timestamp,
      IP_ADDRESS_ varchar(255),
      USER_AGENT_ varchar(255),
      USER_ID_ varchar(255),
      TOKEN_DATA_ varchar(2000),
      primary key (ID_)
  );
  
  create table ACT_ID_PRIV (
      ID_ varchar(64) not null,
      NAME_ varchar(255) not null,
      primary key (ID_)
  );
  
  create table ACT_ID_PRIV_MAPPING (
      ID_ varchar(64) not null,
      PRIV_ID_ varchar(64) not null,
      USER_ID_ varchar(255),
      GROUP_ID_ varchar(255),
      primary key (ID_)
  );
  
  alter table ACT_ID_MEMBERSHIP
  add constraint ACT_FK_MEMB_GROUP
  foreign key (GROUP_ID_)
  references ACT_ID_GROUP;
  
  alter table ACT_ID_MEMBERSHIP
  add constraint ACT_FK_MEMB_USER
  foreign key (USER_ID_)
  references ACT_ID_USER;
  
  alter table ACT_ID_PRIV_MAPPING
      add constraint ACT_FK_PRIV_MAPPING
      foreign key (PRIV_ID_)
      references ACT_ID_PRIV;
  
  create index ACT_IDX_PRIV_USER on ACT_ID_PRIV_MAPPING(USER_ID_);
  create index ACT_IDX_PRIV_GROUP on ACT_ID_PRIV_MAPPING(GROUP_ID_);
  
  alter table ACT_ID_PRIV
      add constraint ACT_UNIQ_PRIV_NAME
      unique (NAME_);
  