text: create table ACT_GE_PROPERTY (
      NAME_ nvarchar(64),
      VALUE_ nvarchar(300),
      REV_ int,
      primary key (NAME_)
  );
  
  insert into ACT_GE_PROPERTY
  values ('schema.version', '5.10', 1);
  
  insert into ACT_GE_PROPERTY
  values ('schema.history', 'create(5.10)', 1);
  
  insert into ACT_GE_PROPERTY
  values ('next.dbid', '1', 1);
  
  create table ACT_GE_BYTEARRAY (
      ID_ nvarchar(64),
      REV_ int,
      NAME_ nvarchar(255),
      DEPLOYMENT_ID_ nvarchar(64),
      BYTES_ image,
      GENERATED_ tinyint,
      primary key (ID_)
  );
  
  create table ACT_RE_DEPLOYMENT (
      ID_ nvarchar(64),
      NAME_ nvarchar(255),
      DEPLOY_TIME_ datetime,
      primary key (ID_)
  );
  
  create table ACT_RU_EXECUTION (
      ID_ nvarchar(64),
      REV_ int,
      PROC_INST_ID_ nvarchar(64),
      BUSINESS_KEY_ nvarchar(255),
      PARENT_ID_ nvarchar(64),
      PROC_DEF_ID_ nvarchar(64),
      SUPER_EXEC_ nvarchar(64),
      ACT_ID_ nvarchar(255),
      IS_ACTIVE_ tinyint,
      IS_CONCURRENT_ tinyint,
      IS_SCOPE_ tinyint,
      IS_EVENT_SCOPE_ tinyint,
      SUSPENSION_STATE_ tinyint,
      CACHED_ENT_STATE_ int,
      primary key (ID_)
  );
  
  create table ACT_RU_JOB (
      ID_ nvarchar(64) NOT NULL,
  	REV_ int,
      TYPE_ nvarchar(255) NOT NULL,
      LOCK_EXP_TIME_ datetime,
      LOCK_OWNER_ nvarchar(255),
      EXCLUSIVE_ bit,
      EXECUTION_ID_ nvarchar(64),
      PROCESS_INSTANCE_ID_ nvarchar(64),
      RETRIES_ int,
      EXCEPTION_STACK_ID_ nvarchar(64),
      EXCEPTION_MSG_ nvarchar(4000),
      DUEDATE_ datetime NULL,
      REPEAT_ nvarchar(255),
      HANDLER_TYPE_ nvarchar(255),
      HANDLER_CFG_ nvarchar(4000),
      primary key (ID_)
  );
  
  create table ACT_RE_PROCDEF (
      ID_ nvarchar(64),
      REV_ int,
      CATEGORY_ nvarchar(255),
      NAME_ nvarchar(255),
      KEY_ nvarchar(255),
      VERSION_ int,
      DEPLOYMENT_ID_ nvarchar(64),
      RESOURCE_NAME_ nvarchar(4000),
      DGRM_RESOURCE_NAME_ nvarchar(4000),
      HAS_START_FORM_KEY_ tinyint,
      SUSPENSION_STATE_ tinyint,
      primary key (ID_)
  );
  
  create table ACT_RU_TASK (
      ID_ nvarchar(64),
      REV_ int,
      EXECUTION_ID_ nvarchar(64),
      PROC_INST_ID_ nvarchar(64),
      PROC_DEF_ID_ nvarchar(64),
      NAME_ nvarchar(255),
      PARENT_TASK_ID_ nvarchar(64),
      DESCRIPTION_ nvarchar(4000),
      TASK_DEF_KEY_ nvarchar(255),
      OWNER_ nvarchar(64),
      ASSIGNEE_ nvarchar(64),
      DELEGATION_ nvarchar(64),
      PRIORITY_ int,
      CREATE_TIME_ datetime,
      DUE_DATE_ datetime,
      primary key (ID_)
  );
  
  create table ACT_RU_IDENTITYLINK (
      ID_ nvarchar(64),
      REV_ int,
      GROUP_ID_ nvarchar(64),
      TYPE_ nvarchar(255),
      USER_ID_ nvarchar(64),
      TASK_ID_ nvarchar(64),
      PROC_DEF_ID_ nvarchar(64),
      primary key (ID_)
  );
  
  create table ACT_RU_VARIABLE (
      ID_ nvarchar(64) not null,
      REV_ int,
      TYPE_ nvarchar(255) not null,
      NAME_ nvarchar(255) not null,
      EXECUTION_ID_ nvarchar(64),
      PROC_INST_ID_ nvarchar(64),
      TASK_ID_ nvarchar(64),
      BYTEARRAY_ID_ nvarchar(64),
      DOUBLE_ double precision,
      LONG_ numeric(19,0),
      TEXT_ nvarchar(4000),
      TEXT2_ nvarchar(4000),
      primary key (ID_)
  );
  
  create table ACT_RU_EVENT_SUBSCR (
      ID_ nvarchar(64) not null,
      REV_ int,
      EVENT_TYPE_ nvarchar(255) not null,
      EVENT_NAME_ nvarchar(255),
      EXECUTION_ID_ nvarchar(64),
      PROC_INST_ID_ nvarchar(64),
      ACTIVITY_ID_ nvarchar(64),
      CONFIGURATION_ nvarchar(255),
      CREATED_ datetime not null,
      primary key (ID_)
  );
  
  create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_);
  create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
  create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
  create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
  create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
  create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_);
  create unique index ACT_UNIQ_RU_BUS_KEY on ACT_RU_EXECUTION (PROC_DEF_ID_, BUSINESS_KEY_) where BUSINESS_KEY_ is not null;
  create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_);
  
  alter table ACT_GE_BYTEARRAY
      add constraint ACT_FK_BYTEARR_DEPL 
      foreign key (DEPLOYMENT_ID_) 
      references ACT_RE_DEPLOYMENT (ID_);
  
  alter table ACT_RE_PROCDEF
      add constraint ACT_UNIQ_PROCDEF
      unique (KEY_,VERSION_);
      
  alter table ACT_RU_EXECUTION
      add constraint ACT_FK_EXE_PARENT 
      foreign key (PARENT_ID_) 
      references ACT_RU_EXECUTION (ID_);
      
  alter table ACT_RU_EXECUTION
      add constraint ACT_FK_EXE_SUPER 
      foreign key (SUPER_EXEC_) 
      references ACT_RU_EXECUTION (ID_);
      
  alter table ACT_RU_IDENTITYLINK
      add constraint ACT_FK_TSKASS_TASK 
      foreign key (TASK_ID_) 
      references ACT_RU_TASK (ID_);
      
  alter table ACT_RU_IDENTITYLINK
      add constraint ACT_FK_ATHRZ_PROCEDEF
      foreign key (PROC_DEF_ID_) 
      references ACT_RE_PROCDEF (ID_);
      
  alter table ACT_RU_TASK
      add constraint ACT_FK_TASK_EXE
      foreign key (EXECUTION_ID_)
      references ACT_RU_EXECUTION (ID_);
      
  alter table ACT_RU_TASK
      add constraint ACT_FK_TASK_PROCINST
      foreign key (PROC_INST_ID_)
      references ACT_RU_EXECUTION (ID_);
      
  alter table ACT_RU_TASK
    add constraint ACT_FK_TASK_PROCDEF
    foreign key (PROC_DEF_ID_)
    references ACT_RE_PROCDEF (ID_);
    
  alter table ACT_RU_VARIABLE 
      add constraint ACT_FK_VAR_EXE 
      foreign key (EXECUTION_ID_) 
      references ACT_RU_EXECUTION (ID_);
  
  alter table ACT_RU_VARIABLE
      add constraint ACT_FK_VAR_PROCINST
      foreign key (PROC_INST_ID_)
      references ACT_RU_EXECUTION(ID_);
  
  alter table ACT_RU_VARIABLE 
      add constraint ACT_FK_VAR_BYTEARRAY 
      foreign key (BYTEARRAY_ID_) 
      references ACT_GE_BYTEARRAY (ID_);
  	
  alter table ACT_RU_JOB 
      add constraint ACT_FK_JOB_EXCEPTION 
      foreign key (EXCEPTION_STACK_ID_) 
      references ACT_GE_BYTEARRAY (ID_);
      
  alter table ACT_RU_EVENT_SUBSCR
      add constraint ACT_FK_EVENT_EXEC
      foreign key (EXECUTION_ID_)
      references ACT_RU_EXECUTION(ID_);