create table Attachment (id serial primary key, accessType integer, attachedAt timestamp, attachmentContentId bigserial not null, contentType varchar(255), name varchar(255), attachment_size integer, attachedBy_id varchar(255), TaskData_Attachments_Id bigserial);
create table BooleanExpression (id serial primary key, expression text, type varchar(255), Escalation_Constraints_Id bigserial);
create table Content (id serial primary key, content BYTEA);
create table Deadline (id serial primary key, deadline_date timestamp, escalated smallint, Deadlines_StartDeadLine_Id bigserial, Deadlines_EndDeadLine_Id bigserial);
create table Escalation (id serial primary key, name varchar(255), Deadline_Escalation_Id bigserial);
create table I18NText (id serial primary key, language varchar(255), shortText varchar(255), text text, Task_Subjects_Id bigserial, Task_Names_Id bigserial, Task_Descriptions_Id bigserial, Reassignment_Documentation_Id bigserial, Notification_Subjects_Id bigserial, Notification_Names_Id bigserial, Notification_Documentation_Id bigserial, Notification_Descriptions_Id bigserial, Deadline_Documentation_Id bigserial);
create table NodeInstanceLog (id serial primary key, log_date timestamp, nodeId varchar(255), nodeInstanceId varchar(255), nodeName varchar(255), processId varchar(255), processInstanceId bigserial not null, type integer not null);
create table Notification (DTYPE varchar(31) not null, id serial primary key, priority integer not null, Escalation_Notifications_Id bigserial);
create table ProcessInstanceInfo (InstanceId serial primary key, OPTLOCK integer, processId varchar(255), startDate timestamp, lastReadDate timestamp, lastModificationDate timestamp, state integer not null, processInstanceByteArray BYTEA);
create table ProcessInstanceLog (id serial primary key, end_date timestamp, outcome varchar(255), parentProcessInstanceId bigserial, processId varchar(255), processInstanceId bigserial not null, start_date timestamp, status integer);
create table Reassignment (id serial primary key, Escalation_Reassignments_Id bigserial);
create table SessionInfo (id serial primary key, lastModificationDate timestamp, rulesByteArray BYTEA, startDate timestamp, OPTLOCK integer);
create table SubTasksStrategy (DTYPE varchar(100) not null, id serial primary key, name varchar(255), Task_Id bigserial);
create table Task (id serial primary key, archived smallint, allowedToDelegate varchar(255), priority integer not null, activationTime timestamp, completedOn timestamp, createdOn timestamp, documentAccessType integer, documentContentId bigserial not null, documentType varchar(255), expirationTime timestamp, faultAccessType integer, faultContentId bigserial not null, faultName varchar(255), faultType varchar(255), outputAccessType integer, outputContentId bigserial not null, outputType varchar(255), parentId bigserial not null, previousStatus integer, processId varchar(255), processInstanceId bigserial not null, processSessionId integer not null, skipable boolean not null, status varchar(255), workItemId bigserial not null, OPTLOCK integer, taskInitiator_id varchar(255), actualOwner_id varchar(255), createdBy_id varchar(255));
create table VariableInstanceLog (id serial primary key, log_date timestamp, processId varchar(255), processInstanceId bigserial not null, value varchar(255), variableId varchar(255), variableInstanceId varchar(255));
create table WorkItemInfo (workItemId serial primary key, creationDate timestamp, name varchar(255), processInstanceId bigserial not null, state bigserial not null, OPTLOCK integer, workItemByteArray BYTEA);
create table email_header (id serial primary key, body text, fromAddress varchar(255), language varchar(255), replyToAddress varchar(255), subject varchar(255));
create table task_comment (id serial primary key, addedAt timestamp, text text, addedBy_id varchar(255), TaskData_Comments_Id bigserial);