text: /* Copied from ado-mysql.sql*/
  /* File generated automatically by dynamo */
  /* Entity types */
  CREATE TABLE entity_type (
    /* the entity type identifier */
    `id` INTEGER  AUTO_INCREMENT,
    /* the entity type name (table name) */
    `name` VARCHAR(127) UNIQUE NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* Sequence generator */
  CREATE TABLE sequence (
    /* the sequence name */
    `name` VARCHAR(127) NOT NULL,
    /* the sequence record version */
    `version` int ,
    /* the sequence value */
    `value` BIGINT ,
    /* the sequence block size */
    `block_size` BIGINT ,
    PRIMARY KEY (`name`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;;
  INSERT INTO entity_type (name) VALUES
  ("entity_type")
  ,("sequence")
  ;
  /* Copied from awa-mysql.sql*/
  /* File generated automatically by dynamo */
  /* The Audit table records the changes made on database on behalf of a user.
  The record indicates the database table and row, the field being updated,
  the old and new value. The old and new values are converted to a string
  and they truncated if necessary to 256 characters. */
  CREATE TABLE awa_audit (
    /* the audit identifier */
    `id` BIGINT NOT NULL,
    /* the date when the field was modified. */
    `date` DATETIME NOT NULL,
    /* the old field value. */
    `old_value` VARCHAR(255) BINARY ,
    /* the new field value. */
    `new_value` VARCHAR(255) BINARY ,
    /* the database entity identifier to which the audit is associated. */
    `entity_id` BIGINT NOT NULL,
    /*  */
    `field` INTEGER NOT NULL,
    /* the user session under which the field was modified. */
    `session_id` BIGINT ,
    /* the entity type. */
    `entity_type` INTEGER NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The Audit_Field table describes
  the database field being updated. */
  CREATE TABLE awa_audit_field (
    /* the audit field identifier. */
    `id` INTEGER NOT NULL AUTO_INCREMENT,
    /* the audit field name. */
    `name` VARCHAR(255) BINARY NOT NULL,
    /* the entity type */
    `entity_type` INTEGER NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE awa_message (
    /* the message identifier */
    `id` BIGINT NOT NULL,
    /* the message creation date */
    `create_date` DATETIME NOT NULL,
    /* the message priority */
    `priority` INTEGER NOT NULL,
    /* the message count */
    `count` INTEGER NOT NULL,
    /* the message parameters */
    `parameters` VARCHAR(255) BINARY NOT NULL,
    /* the server identifier which processes the message */
    `server_id` INTEGER NOT NULL,
    /* the task identfier on the server which processes the message */
    `task_id` INTEGER NOT NULL,
    /* the message status */
    `status` TINYINT NOT NULL,
    /* the message processing date */
    `processing_date` DATETIME ,
    /*  */
    `version` INTEGER NOT NULL,
    /* the entity identifier to which this event is associated. */
    `entity_id` BIGINT NOT NULL,
    /* the entity type of the entity identifier to which this event is associated. */
    `entity_type` INTEGER NOT NULL,
    /* the date and time when the event was finished to be processed. */
    `finish_date` DATETIME ,
    /*  */
    `queue_id` BIGINT NOT NULL,
    /* the message type */
    `message_type_id` BIGINT NOT NULL,
    /* the optional user who triggered the event message creation */
    `user_id` BIGINT ,
    /* the optional user session that triggered the message creation */
    `session_id` BIGINT ,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE awa_message_type (
    /*  */
    `id` BIGINT NOT NULL,
    /* the message type name */
    `name` VARCHAR(255) BINARY NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The message queue tracks the event messages that must be dispatched by
  a given server. */
  CREATE TABLE awa_queue (
    /*  */
    `id` BIGINT NOT NULL,
    /*  */
    `server_id` INTEGER NOT NULL,
    /* the message queue name */
    `name` VARCHAR(255) BINARY NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The application that is granted access to the database. */
  CREATE TABLE awa_application (
    /* the application identifier. */
    `id` BIGINT NOT NULL,
    /* the application name. */
    `name` VARCHAR(255) BINARY NOT NULL,
    /* the application secret key. */
    `secret_key` VARCHAR(255) BINARY NOT NULL,
    /* the application public identifier. */
    `client_id` VARCHAR(255) BINARY NOT NULL,
    /* the optimistic lock version. */
    `version` INTEGER NOT NULL,
    /* the application create date. */
    `create_date` DATETIME NOT NULL,
    /* the application update date. */
    `update_date` DATETIME NOT NULL,
    /* the application title displayed in the OAuth login form. */
    `title` VARCHAR(255) BINARY NOT NULL,
    /* the application description. */
    `description` VARCHAR(255) BINARY NOT NULL,
    /* the optional login URL. */
    `app_login_url` VARCHAR(255) BINARY NOT NULL,
    /* the application logo URL. */
    `app_logo_url` VARCHAR(255) BINARY NOT NULL,
    /*  */
    `user_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE awa_callback (
    /*  */
    `id` BIGINT NOT NULL,
    /*  */
    `url` VARCHAR(255) BINARY NOT NULL,
    /* the optimistic lock version. */
    `version` INTEGER NOT NULL,
    /*  */
    `application_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The session is created when the user has granted an access to an application
  or when the application has refreshed its access token. */
  CREATE TABLE awa_oauth_session (
    /* the session identifier. */
    `id` BIGINT NOT NULL,
    /* the session creation date. */
    `create_date` DATETIME NOT NULL,
    /* a random salt string to access/request token generation. */
    `salt` VARCHAR(255) BINARY NOT NULL,
    /* the expiration date. */
    `expire_date` DATETIME NOT NULL,
    /* the application that is granted access. */
    `application_id` BIGINT NOT NULL,
    /*  */
    `user_id` BIGINT NOT NULL,
    /*  */
    `session_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The ACL table records permissions which are granted for a user to access a given database entity. */
  CREATE TABLE awa_acl (
    /* the ACL identifier */
    `id` BIGINT NOT NULL,
    /* the entity identifier to which the ACL applies */
    `entity_id` BIGINT NOT NULL,
    /* the writeable flag */
    `writeable` TINYINT NOT NULL,
    /*  */
    `user_id` BIGINT NOT NULL,
    /*  */
    `workspace_id` BIGINT NOT NULL,
    /* the entity type concerned by the ACL. */
    `entity_type` INTEGER NOT NULL,
    /* the permission that is granted. */
    `permission` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The permission table lists all the application permissions that are defined.
  This is a system table shared by every user and workspace.
  The list of permission is fixed and never changes. */
  CREATE TABLE awa_permission (
    /* the permission database identifier. */
    `id` BIGINT NOT NULL,
    /* the permission name */
    `name` VARCHAR(255) BINARY NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE awa_access_key (
    /* the secure access key. */
    `access_key` VARCHAR(255) BINARY NOT NULL,
    /* the access key expiration date. */
    `expire_date` DATE NOT NULL,
    /* the access key identifier. */
    `id` BIGINT NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /* the access key type. */
    `kind` TINYINT NOT NULL,
    /*  */
    `user_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The Email entity defines the user email addresses.
  The user has a primary email address that is obtained
  from the registration process (either through a form
  submission or through OpenID authentication). */
  CREATE TABLE awa_email (
    /* the email address. */
    `email` VARCHAR(255) BINARY NOT NULL,
    /* the last mail delivery status (if known). */
    `status` TINYINT NOT NULL,
    /* the date when the last email error was detected. */
    `last_error_date` DATETIME NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /* the email primary key. */
    `id` BIGINT NOT NULL,
    /* the user. */
    `user_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE awa_session (
    /*  */
    `start_date` DATETIME NOT NULL,
    /*  */
    `end_date` DATETIME ,
    /*  */
    `ip_address` VARCHAR(255) BINARY NOT NULL,
    /*  */
    `stype` TINYINT NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /*  */
    `server_id` INTEGER NOT NULL,
    /*  */
    `id` BIGINT NOT NULL,
    /*  */
    `auth_id` BIGINT ,
    /*  */
    `user_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The User entity represents a user that can access and use the application. */
  CREATE TABLE awa_user (
    /* the user first name. */
    `first_name` VARCHAR(255) BINARY NOT NULL,
    /* the user last name. */
    `last_name` VARCHAR(255) BINARY NOT NULL,
    /* the user password hash. */
    `password` VARCHAR(255) BINARY NOT NULL,
    /* the user OpenID identifier. */
    `open_id` VARCHAR(255) BINARY NOT NULL,
    /* the user country. */
    `country` VARCHAR(255) BINARY NOT NULL,
    /* the user display name. */
    `name` VARCHAR(255) BINARY NOT NULL,
    /* version number. */
    `version` INTEGER NOT NULL,
    /* the user identifier. */
    `id` BIGINT NOT NULL,
    /* the password salt. */
    `salt` VARCHAR(255) BINARY NOT NULL,
    /*  */
    `email_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  INSERT INTO entity_type (name) VALUES
  ("awa_audit")
  ,("awa_audit_field")
  ,("awa_message")
  ,("awa_message_type")
  ,("awa_queue")
  ,("awa_application")
  ,("awa_callback")
  ,("awa_oauth_session")
  ,("awa_acl")
  ,("awa_permission")
  ,("awa_access_key")
  ,("awa_email")
  ,("awa_session")
  ,("awa_user")
  ;
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_user"), "first_name");
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_user"), "last_name");
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_user"), "country");
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_user"), "name");
  /* Copied from awa-workspaces-mysql.sql*/
  /* File generated automatically by dynamo */
  /*  */
  CREATE TABLE awa_invitation (
    /* the invitation identifier. */
    `id` BIGINT NOT NULL,
    /* version optimistic lock. */
    `version` INTEGER NOT NULL,
    /* date when the invitation was created and sent. */
    `create_date` DATETIME NOT NULL,
    /* the email address to which the invitation was sent. */
    `email` VARCHAR(255) BINARY NOT NULL,
    /* the invitation message. */
    `message` text NOT NULL,
    /* the date when the invitation was accepted. */
    `acceptance_date` DATETIME ,
    /* the workspace where the user is invited. */
    `workspace_id` BIGINT NOT NULL,
    /*  */
    `access_key_id` BIGINT ,
    /* the user being invited. */
    `invitee_id` BIGINT ,
    /*  */
    `inviter_id` BIGINT NOT NULL,
    /*  */
    `member_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The workspace controls the features available in the application
  for a set of users: the workspace members.  A user could create
  several workspaces and be part of several workspaces that other
  users have created. */
  CREATE TABLE awa_workspace (
    /* the workspace identifier */
    `id` BIGINT NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /*  */
    `create_date` DATETIME NOT NULL,
    /*  */
    `owner_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE awa_workspace_feature (
    /*  */
    `id` BIGINT NOT NULL,
    /*  */
    `limit` INTEGER NOT NULL,
    /*  */
    `workspace_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The workspace member indicates the users who
  are part of the workspace. The join_date is NULL when
  a user was invited but has not accepted the invitation. */
  CREATE TABLE awa_workspace_member (
    /*  */
    `id` BIGINT NOT NULL,
    /* the date when the user has joined the workspace. */
    `join_date` DATETIME ,
    /* the member role. */
    `role` VARCHAR(255) BINARY NOT NULL,
    /*  */
    `member_id` BIGINT NOT NULL,
    /*  */
    `workspace_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  INSERT INTO entity_type (name) VALUES
  ("awa_invitation")
  ,("awa_workspace")
  ,("awa_workspace_feature")
  ,("awa_workspace_member")
  ;
  /* Copied from awa-comments-mysql.sql*/
  /* File generated automatically by dynamo */
  /* The Comment table records a user comment associated with a database entity.
  The comment can be associated with any other database record. */
  CREATE TABLE awa_comment (
    /* the comment publication date */
    `create_date` DATETIME NOT NULL,
    /* the comment message. */
    `message` TEXT NOT NULL,
    /* the entity identifier to which this comment is associated */
    `entity_id` BIGINT NOT NULL,
    /* the comment identifier */
    `id` BIGINT NOT NULL,
    /* the optimistic lock version. */
    `version` INTEGER NOT NULL,
    /* the entity type that identifies the table to which the comment is associated. */
    `entity_type` INTEGER NOT NULL,
    /* the comment status to decide whether the comment is visible (published) or not. */
    `status` INTEGER NOT NULL,
    /* the comment format type. */
    `format` INTEGER NOT NULL,
    /*  */
    `author_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  INSERT INTO entity_type (name) VALUES
  ("awa_comment")
  ;
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_comment"), "message");
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_comment"), "status");
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_comment"), "format");
  /* Copied from awa-storages-mysql.sql*/
  /* File generated automatically by dynamo */
  /* The uri member holds the URI if the storage type is URL.
  
  When storage is FILE, the local file path is built by using
  the workspace identifier and the storage identifier. */
  CREATE TABLE awa_storage (
    /* the storage type which defines where the content is stored */
    `storage` TINYINT NOT NULL,
    /* the storage creation date */
    `create_date` DATETIME NOT NULL,
    /* the file name */
    `name` VARCHAR(255) BINARY NOT NULL,
    /* the file size */
    `file_size` INTEGER NOT NULL,
    /* the mime type */
    `mime_type` VARCHAR(255) BINARY NOT NULL,
    /* the storage URI */
    `uri` VARCHAR(255) BINARY NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /* the storage identifier */
    `id` BIGINT NOT NULL,
    /* whether the document is public or not. */
    `is_public` TINYINT NOT NULL,
    /*  */
    `original_id` BIGINT ,
    /*  */
    `store_data_id` BIGINT ,
    /*  */
    `owner_id` BIGINT NOT NULL,
    /*  */
    `workspace_id` BIGINT NOT NULL,
    /*  */
    `folder_id` BIGINT ,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The storage data is created only if the storage type
  is set to DATABASE.  It holds the file content in the blob. */
  CREATE TABLE awa_storage_data (
    /* the storage data identifier */
    `id` BIGINT NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /* the storage content */
    `data` LONGBLOB NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE awa_storage_folder (
    /* the storage folder identifier */
    `id` BIGINT NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /* the folder creation date */
    `create_date` DATETIME NOT NULL,
    /*  */
    `name` VARCHAR(255) BINARY NOT NULL,
    /*  */
    `workspace_id` BIGINT NOT NULL,
    /*  */
    `owner_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The local store record is created when a copy of the data is needed on the local file system.
  The creation date refers to the date when the data was copied to the local file system.
  The expiration date indicates a date after which the local file can be removed
  from the local file system. */
  CREATE TABLE awa_store_local (
    /* the local store identifier */
    `id` BIGINT NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /*  */
    `store_version` INTEGER NOT NULL,
    /* the shared flag which indicates whether this local store can be shared by several clients. */
    `shared` TINYINT NOT NULL,
    /* the local store path */
    `path` VARCHAR(255) BINARY NOT NULL,
    /* the local store expiration date */
    `expire_date` DATE NOT NULL,
    /* the creation date */
    `create_date` DATETIME NOT NULL,
    /*  */
    `storage_id` BIGINT ,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  INSERT INTO entity_type (name) VALUES
  ("awa_storage")
  ,("awa_storage_data")
  ,("awa_storage_folder")
  ,("awa_store_local")
  ;
  /* Copied from awa-tags-mysql.sql*/
  /* File generated automatically by dynamo */
  /* The tag definition. */
  CREATE TABLE awa_tag (
    /* the tag identifier */
    `id` BIGINT NOT NULL,
    /* the tag name */
    `name` VARCHAR(255) BINARY NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE awa_tagged_entity (
    /* the tag entity identifier */
    `id` BIGINT NOT NULL,
    /* Title: Tag model
  Date: 2013-02-23the database entity to which the tag is associated */
    `for_entity_id` BIGINT NOT NULL,
    /* the entity type */
    `entity_type` INTEGER NOT NULL,
    /*  */
    `tag_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  INSERT INTO entity_type (name) VALUES
  ("awa_tag")
  ,("awa_tagged_entity")
  ;
  /* Copied from awa-jobs-mysql.sql*/
  /* File generated automatically by dynamo */
  /* The job is associated with a dispatching queue. */
  CREATE TABLE awa_job (
    /* the job identifier */
    `id` BIGINT NOT NULL,
    /* the job status */
    `status` TINYINT NOT NULL,
    /* the job name */
    `name` VARCHAR(255) BINARY NOT NULL,
    /* the job start date */
    `start_date` DATETIME ,
    /* the job creation date */
    `create_date` DATETIME NOT NULL,
    /* the job finish date */
    `finish_date` DATETIME ,
    /* the job progress indicator */
    `progress` INTEGER NOT NULL,
    /* the job parameters */
    `parameters` TEXT NOT NULL,
    /* the job result */
    `results` TEXT NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /* the job priority */
    `priority` INTEGER NOT NULL,
    /*  */
    `user_id` BIGINT ,
    /*  */
    `event_id` BIGINT ,
    /*  */
    `session_id` BIGINT ,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  INSERT INTO entity_type (name) VALUES
  ("awa_job")
  ;
  /* Copied from awa-images-mysql.sql*/
  /* File generated automatically by dynamo */
  /* - The workspace contains one or several folders.
  - Each image folder contains a set of images that have been uploaded by the user.
  - An image can be visible if a user has an ACL permission to read the associated folder.
  - An image marked as 'public=True' can be visible by anybody */
  CREATE TABLE awa_image (
    /* the image identifier */
    `id` BIGINT NOT NULL,
    /* the image width */
    `width` INTEGER NOT NULL,
    /* the image height */
    `height` INTEGER NOT NULL,
    /* the thumbnail width */
    `thumb_width` INTEGER NOT NULL,
    /* the thumbnail height */
    `thumb_height` INTEGER NOT NULL,
    /*  */
    `path` VARCHAR(255) BINARY NOT NULL,
    /*  */
    `public` TINYINT NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /*  */
    `thumbnail_id` BIGINT ,
    /*  */
    `folder_id` BIGINT NOT NULL,
    /*  */
    `owner_id` BIGINT NOT NULL,
    /*  */
    `storage_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  INSERT INTO entity_type (name) VALUES
  ("awa_image")
  ;
  /* Copied from awa_counters-mysql.sql*/
  /* File generated automatically by dynamo */
  /*  */
  CREATE TABLE awa_counter (
    /* the object associated with the counter. */
    `object_id` BIGINT NOT NULL,
    /* the day associated with the counter. */
    `date` DATE NOT NULL,
    /* the counter value. */
    `counter` INTEGER NOT NULL,
    /* the counter definition identifier. */
    `definition_id` BIGINT NOT NULL,
    PRIMARY KEY (`object_id`, `date`, `definition_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* A counter definition defines what the counter represents. It uniquely identifies
  the counter for the Counter table. A counter may be associated with a database
  table. In that case, the counter definition has a relation to the corresponding Entity_Type. */
  CREATE TABLE awa_counter_definition (
    /* the counter name. */
    `name` VARCHAR(255) BINARY NOT NULL,
    /* the counter unique id. */
    `id` INTEGER NOT NULL,
    /* the optional entity type that identifies the database table. */
    `entity_type` INTEGER ,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE awa_visit (
    /* the entity identifier. */
    `object_id` BIGINT NOT NULL,
    /* the number of times the entity was visited by the user. */
    `counter` INTEGER NOT NULL,
    /* the date and time when the entity was last visited. */
    `date` DATETIME NOT NULL,
    /* the user who visited the entity. */
    `user` BIGINT NOT NULL,
    /* the counter definition identifier. */
    `definition_id` BIGINT NOT NULL,
    PRIMARY KEY (`object_id`, `user`, `definition_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  INSERT INTO entity_type (name) VALUES
  ("awa_counter")
  ,("awa_counter_definition")
  ,("awa_visit")
  ;
  /* Copied from awa-wikis-mysql.sql*/
  /* File generated automatically by dynamo */
  /*  */
  CREATE TABLE awa_wiki_content (
    /* the wiki page content identifier */
    `id` BIGINT NOT NULL,
    /* the wiki content creation date */
    `create_date` DATETIME NOT NULL,
    /* the wiki text content */
    `content` TEXT NOT NULL,
    /* the format type used used by the wiki content */
    `format` TINYINT NOT NULL,
    /* the content comment string */
    `save_comment` VARCHAR(255) BINARY NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /* the wiki page version */
    `page_version` INTEGER NOT NULL,
    /* the wiki page that this Wiki_Content belongs to */
    `page_id` BIGINT NOT NULL,
    /* the page version author */
    `author_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The wiki page represents a page with its versions.
  It refers to the last version which is currently visible.
  It has an optional preview image which defines
  the thumbnail preview of the last/current wiki content. */
  CREATE TABLE awa_wiki_page (
    /* the wiki page identifier */
    `id` BIGINT NOT NULL,
    /* the wiki page name */
    `name` VARCHAR(255) BINARY NOT NULL,
    /* the last page version number */
    `last_version` INTEGER NOT NULL,
    /* whether the wiki page is public */
    `is_public` TINYINT NOT NULL,
    /* the page title */
    `title` VARCHAR(255) BINARY NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /* a read counter which indicates how many times the page was read. */
    `read_count` INTEGER NOT NULL,
    /* the wiki page preview. */
    `preview_id` BIGINT ,
    /* the wiki space that this page belongs to */
    `wiki_id` BIGINT NOT NULL,
    /* the current content (or last version) */
    `content_id` BIGINT ,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* Permission is granted to display a wiki page if there is
  an ACL entry between the wiki space and the user. */
  CREATE TABLE awa_wiki_space (
    /* the wiki space identifier */
    `id` BIGINT NOT NULL,
    /* the wiki name */
    `name` VARCHAR(255) BINARY NOT NULL,
    /* whether the wiki is public */
    `is_public` TINYINT NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /* the wiki creation date. */
    `create_date` DATETIME NOT NULL,
    /* the left panel side wiki text for every page. */
    `left_side` TEXT NOT NULL,
    /* the right panel wiki text for every page. */
    `right_side` TEXT NOT NULL,
    /* the default wiki page format. */
    `format` TINYINT NOT NULL,
    /*  */
    `workspace_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  INSERT INTO entity_type (name) VALUES
  ("awa_wiki_content")
  ,("awa_wiki_page")
  ,("awa_wiki_space")
  ;
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_wiki_page"), "name");
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_wiki_page"), "last_version");
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_wiki_page"), "is_public");
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_wiki_page"), "title");
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_wiki_space"), "name");
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_wiki_space"), "is_public");
  INSERT INTO awa_audit_field (entity_type, name)
    VALUES ((SELECT id FROM entity_type WHERE name = "awa_wiki_space"), "format");
  /* Copied from hyperion-mysql.sql*/
  /* File generated automatically by dynamo */
  /* The Agent table holds the information about a monitoring agent
  who is allowed to connect to the Hyperion server. */
  CREATE TABLE hyperion_agent (
    /* the agent identifier */
    `id` BIGINT NOT NULL,
    /* the agent host name */
    `hostname` VARCHAR(255) BINARY NOT NULL,
    /* the IP address */
    `ip` VARCHAR(255) BINARY NOT NULL,
    /* the agent key */
    `key` VARCHAR(255) BINARY NOT NULL,
    /* the date when the agent was registered */
    `create_date` DATETIME NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE hyperion_host_desc (
    /* the identifier */
    `id` BIGINT NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /* the description text */
    `content` text NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE hyperion_host (
    /* the host identifier */
    `id` BIGINT NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /* the host name */
    `name` VARCHAR(255) BINARY NOT NULL,
    /* the IPv4 address */
    `ip` VARCHAR(255) BINARY NOT NULL,
    /* the host identification key */
    `key` VARCHAR(255) BINARY NOT NULL,
    /* the host creation date */
    `create_date` DATETIME NOT NULL,
    /* the serial number */
    `serial` VARCHAR(255) BINARY NOT NULL,
    /* host description text */
    `description` VARCHAR(255) BINARY NOT NULL,
    /* the host status type */
    `status` TINYINT NOT NULL,
    /*  */
    `agent_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE hyperion_host_info (
    /*  */
    `id` BIGINT NOT NULL,
    /*  */
    `version` INTEGER NOT NULL,
    /* the description index */
    `index` INTEGER NOT NULL,
    /*  */
    `host_id` BIGINT NOT NULL,
    /*  */
    `desc_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The Series table holds the collected data
  for a given time frame. Values are serialized
  in the 'content' blob in a format described by
  the Format_Type enumeration. */
  CREATE TABLE hyperion_series (
    /* the series unique identifier */
    `id` BIGINT NOT NULL,
    /* the optimistic lock version. */
    `version` INTEGER NOT NULL,
    /* the date and time of the first value in the series. */
    `start_date` DATETIME NOT NULL,
    /* the date and time of the last value in the series. */
    `end_date` DATETIME NOT NULL,
    /* the series content (JSON). */
    `content` LONGBLOB NOT NULL,
    /* the number of values in the series. */
    `count` INTEGER NOT NULL,
    /* the first value of the serie. */
    `first_value` INTEGER NOT NULL,
    /* the format of the content blob data. */
    `format`  NOT NULL,
    /*  */
    `source_id` BIGINT NOT NULL,
    /* the snapshot that produced the series */
    `snapshot_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*  */
  CREATE TABLE hyperion_snapshot (
    /* the snapshot identifier */
    `id` BIGINT NOT NULL,
    /* the snapshot date */
    `start_date` DATETIME NOT NULL,
    /* the snapshot end date. */
    `end_date` DATETIME NOT NULL,
    /* the optimistic lock version */
    `version` INTEGER NOT NULL,
    /* the host to which the snapshot is associated */
    `host_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /* The source describes an element of the system that is monitored and which
  for which we have collected data. */
  CREATE TABLE hyperion_source (
    /* unique identifier. */
    `id` BIGINT NOT NULL,
    /* the time series name. */
    `name` VARCHAR(255) BINARY NOT NULL,
    /* the label to be used in presentation. */
    `label` VARCHAR(255) BINARY NOT NULL,
    /* the optimistic lock version */
    `version` INTEGER NOT NULL,
    /* the host to which the source is associated */
    `host_id` BIGINT NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  INSERT INTO entity_type (name) VALUES
  ("hyperion_agent")
  ,("hyperion_host_desc")
  ,("hyperion_host")
  ,("hyperion_host_info")
  ,("hyperion_series")
  ,("hyperion_snapshot")
  ,("hyperion_source")
  ;
  