text: create table ACT_ID_PROPERTY (
      NAME_ varchar(64),
      VALUE_ varchar(300),
      REV_ integer,
      primary key (NAME_)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  
  insert into ACT_ID_PROPERTY
  values ('schema.version', '6.5.1.6', 1);
  
  create table ACT_ID_BYTEARRAY (
      ID_ varchar(64),
      REV_ integer,
      NAME_ varchar(255),
      BYTES_ LONGBLOB,
      primary key (ID_)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  
  create table ACT_ID_GROUP (
      ID_ varchar(64),
      REV_ integer,
      NAME_ varchar(255),
      TYPE_ varchar(255),
      primary key (ID_)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  
  create table ACT_ID_MEMBERSHIP (
      USER_ID_ varchar(64),
      GROUP_ID_ varchar(64),
      primary key (USER_ID_, GROUP_ID_)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  
  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_)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  
  create table ACT_ID_INFO (
      ID_ varchar(64),
      REV_ integer,
      USER_ID_ varchar(64),
      TYPE_ varchar(64),
      KEY_ varchar(255),
      VALUE_ varchar(255),
      PASSWORD_ LONGBLOB,
      PARENT_ID_ varchar(255),
      primary key (ID_)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  
  create table ACT_ID_TOKEN (
      ID_ varchar(64) not null,
      REV_ integer,
      TOKEN_VALUE_ varchar(255),
      TOKEN_DATE_ timestamp(3),
      IP_ADDRESS_ varchar(255),
      USER_AGENT_ varchar(255),
      USER_ID_ varchar(255),
      TOKEN_DATA_ varchar(2000),
      primary key (ID_)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  
  create table ACT_ID_PRIV (
      ID_ varchar(64) not null,
      NAME_ varchar(255) not null,
      primary key (ID_)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  
  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_)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  
  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_PRIV_MAPPING
      add constraint ACT_FK_PRIV_MAPPING
      foreign key (PRIV_ID_)
      references ACT_ID_PRIV (ID_);
  
  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_);
  