<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<database name="ierfpdgl" schema="public" type="PostgreSQL - 11.18 (Ubuntu 11.18-1.pgdg18.04+1)">
   <tables>
      <table name="accounts" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Account ID" size="10" type="int4">
            <child column="account" foreignKey="fk_actionsteps_account" implied="false" onDeleteCascade="false" schema="public" table="actionsteps"/>
            <child column="account" foreignKey="fk_addresses_account" implied="false" onDeleteCascade="true" schema="public" table="addresses"/>
            <child column="account" foreignKey="fk_contracts_account" implied="false" onDeleteCascade="false" schema="public" table="contracts"/>
            <child column="account" foreignKey="fk_dunning_account" implied="false" onDeleteCascade="false" schema="public" table="dunning"/>
            <child column="account" foreignKey="fk_opportunities_account" implied="false" onDeleteCascade="false" schema="public" table="opportunities"/>
            <child column="account" foreignKey="fk_payments_account" implied="false" onDeleteCascade="false" schema="public" table="payments"/>
            <child column="account" foreignKey="fk_pricelists2accounts_account" implied="false" onDeleteCascade="true" schema="public" table="pricelists2accounts"/>
            <child column="account" foreignKey="fk_suppliers_account" implied="false" onDeleteCascade="true" schema="public" table="suppliers"/>
            <child column="account" foreignKey="fk_tickets_account" implied="false" onDeleteCascade="false" schema="public" table="tickets"/>
            <child column="account" foreignKey="fk_transactions_account" implied="false" onDeleteCascade="false" schema="public" table="transactions"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_accounts_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_accounts_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_accounts_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="contact" nullable="true" remarks="Contact ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_accounts_contact" implied="false" onDeleteCascade="false" schema="public" table="contacts"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="8" name="lastname" nullable="false" remarks="Last name (surname or company name); is required if `firstname` is empty" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="9" name="firstname" nullable="false" remarks="First name (given name); is required if `lastname` is empty" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="type" nullable="false" remarks="Account type (`0`=PROSPECT, `1`=CUSTOMER, `2`=SUPPLIER, `3`=CUSTOMERANDSUPPLIER, `4`=COMPETITOR, `5`=EMPLOYEE)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="customernum" nullable="false" remarks="Customer number (only for PROSPECT, CUSTOMERANDSUPPLIER, CUSTOMER or EMPLOYEE)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="12" name="suppliernum" nullable="false" remarks="Supplier number (only for SUPPLIER or CUSTOMERANDSUPPLIER)" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="13" name="currency" nullable="false" remarks="Currency code ([ISO 4217](http://en.wikipedia.org/wiki/ISO_4217)) (Pattern: `^[A-Z]{3}$`)" size="3" type="varchar"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="locked" nullable="false" remarks="Deny booking of billing or procurement transactions" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="excludetax" nullable="false" remarks="Exclude from taxation" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="16" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_accounts" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_accounts_contact" unique="false">
            <column ascending="true" name="contact"/>
         </index>
         <index name="i_accounts_lastname_firstname_ID" unique="false">
            <column ascending="true" name="lastname"/>
            <column ascending="true" name="firstname"/>
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_accounts_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_accounts_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_accounts" unique="false">
            <column ascending="true" name="lastname"/>
            <column ascending="true" name="firstname"/>
            <column ascending="true" name="customernum"/>
            <column ascending="true" name="suppliernum"/>
         </index>
      </table>
      <table name="actionsteps" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Action step ID" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_actionsteps_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_actionsteps_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_actionsteps_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_actionsteps_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="6" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="7" name="task" nullable="true" remarks="Task ID; is mutually exclusive to `ticket` and `account`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_actionsteps_task" implied="false" onDeleteCascade="false" schema="public" table="tasks"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="ticket" nullable="true" remarks="Ticket ID; is mutually exclusive to `task` and `account`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_actionsteps_ticket" implied="false" onDeleteCascade="false" schema="public" table="tickets"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="account" nullable="true" remarks="Account ID; is mutually exclusive to `task` and `ticket`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_actionsteps_account" implied="false" onDeleteCascade="false" schema="public" table="accounts"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="transaction" nullable="true" remarks="Transaction ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_actionsteps_transaction" implied="false" onDeleteCascade="false" schema="public" table="transactions"/>
         </column>
         <column autoUpdated="false" digits="0" id="11" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="12" name="actionnum" nullable="false" remarks="Action number" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="13" name="date" nullable="false" remarks="Designated date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="14" name="duedate" nullable="true" remarks="Due date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="status" nullable="false" remarks="Status (`0`=DRAFT, `1`=COMPLETED, `2`=CANCELLED, `3`=BOOKED)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="effort" nullable="false" remarks="Effort in minutes" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="17" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_actionsteps" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_actionsteps_account" unique="false">
            <column ascending="true" name="account"/>
         </index>
         <index name="fk_actionsteps_task" unique="false">
            <column ascending="true" name="task"/>
         </index>
         <index name="fk_actionsteps_ticket" unique="false">
            <column ascending="true" name="ticket"/>
         </index>
         <index name="fk_actionsteps_transaction" unique="false">
            <column ascending="true" name="transaction"/>
         </index>
         <index name="i_actionsteps_date_ID" unique="false">
            <column ascending="false" name="date"/>
            <column ascending="false" name="ID"/>
         </index>
         <index name="i_actionsteps_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_actionsteps_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_actionsteps" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="actionnum"/>
         </index>
      </table>
      <table name="addresses" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Address ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_addresses_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="account" nullable="false" remarks="Account ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_addresses_account" implied="false" onDeleteCascade="true" schema="public" table="accounts"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="contact" nullable="false" remarks="Contact ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_addresses_contact" implied="false" onDeleteCascade="true" schema="public" table="contacts"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="type" nullable="false" remarks="Address type (`0`=BILLING_SHIPPING, `1`=BILLING_BILLING, `2`=PROCUREMENT_SHIPPING, `3`=PROCUREMENT_BILLING)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="default" nullable="false" remarks="Default for this address type" size="5" type="int2"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_addresses" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_addresses_contact" unique="false">
            <column ascending="true" name="contact"/>
         </index>
         <index name="u_addresses_account_contact_type" unique="true">
            <column ascending="true" name="account"/>
            <column ascending="true" name="contact"/>
            <column ascending="true" name="type"/>
            <column ascending="true" name="default"/>
         </index>
      </table>
      <table name="applications" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Application ID" size="10" type="int4">
            <child column="application" foreignKey="fk_resources_application" implied="false" onDeleteCascade="true" schema="public" table="resources"/>
            <child column="application" foreignKey="fk_services_application" implied="false" onDeleteCascade="true" schema="public" table="services"/>
            <child column="application" foreignKey="fk_weblets_application" implied="false" onDeleteCascade="true" schema="public" table="weblets"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_applications_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="settingsbinfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="5" name="usersettingsbinfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="activity" nullable="false" remarks="Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="7" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="8" name="identifier" nullable="false" remarks="Unique application identifier (Pattern: `^[a-zA-Z\d][\w.-]*$`)" size="200" type="varchar"/>
         <column autoUpdated="false" defaultValue="10000" digits="0" id="9" name="version" nullable="false" remarks="Version number (formatted as 1.00-00)" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="10" name="vendor" nullable="false" remarks="Vendor (developer or company name)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::character varying" digits="0" id="11" name="secret" nullable="false" remarks="" size="40" type="varchar"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="restricted" nullable="false" remarks="" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="13" name="defaultsettings" nullable="true" remarks="" size="2147483647" type="json"/>
         <column autoUpdated="false" digits="0" id="14" name="settings" nullable="true" remarks="" size="2147483647" type="json"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_applications" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="s_applications" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="identifier"/>
         </index>
         <index name="u_applications_identifier" unique="true">
            <column ascending="true" name="identifier"/>
         </index>
         <index name="u_applications_secret" unique="true">
            <column ascending="true" name="secret"/>
         </index>
      </table>
      <table name="appointments" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Appointment ID" size="10" type="int4">
            <child column="appointment" foreignKey="fk_davids_appointment" implied="false" onDeleteCascade="false" schema="public" table="davids"/>
            <child column="appointment" foreignKey="fk_invitations_appointment" implied="false" onDeleteCascade="true" schema="public" table="invitations"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_appointments_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_appointments_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_appointments_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_appointments_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="6" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="8" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="9" name="location" nullable="false" remarks="Location" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::character varying" digits="0" id="10" name="color" nullable="false" remarks="Color code (CSS-style hexadecimal without `#`) (Pattern: `^([A-F\d]{3}){0,2}$`)" size="6" type="varchar"/>
         <column autoUpdated="false" digits="0" id="11" name="datefrom" nullable="false" remarks="Start date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be less than or equal to `dateto`" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="12" name="dateto" nullable="false" remarks="End date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be greater than or equal to `datefrom`" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="13" name="recurrence" nullable="true" remarks="Recurrence (`0`=DAY, `1`=WORKDAY, `2`=WEEK, `3`=MONTH, `4`=YEAR)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="14" name="interval" nullable="false" remarks="Recurrence interval in minutes" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="15" name="daterecurrence" nullable="true" remarks="Recurrence end date as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="16" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_appointments" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_appointments_datefrom_dateto" unique="false">
            <column ascending="true" name="datefrom"/>
            <column ascending="true" name="dateto"/>
         </index>
         <index name="i_appointments_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_appointments_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_appointments" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="location"/>
         </index>
      </table>
      <table name="associations" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Association ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="3" name="entity1" nullable="false" remarks="First canonical entity" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="entity2" nullable="false" remarks="Second canonical entity" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="5" name="index1" nullable="false" remarks="First entity ID" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="6" name="index2" nullable="false" remarks="Second entity ID" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="7" name="relation" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="8" name="meta" nullable="true" remarks="" size="2147483647" type="json"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_associations" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_associations_entity2_index2" unique="false">
            <column ascending="true" name="entity2"/>
            <column ascending="true" name="index2"/>
         </index>
         <index name="u_associations_entity1_index1_entity2_index2" unique="true">
            <column ascending="true" name="entity1"/>
            <column ascending="true" name="index1"/>
            <column ascending="true" name="entity2"/>
            <column ascending="true" name="index2"/>
         </index>
      </table>
      <table name="binfiles" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="ID" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="size" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="date" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="3" name="hash" nullable="false" remarks="" size="32" type="varchar"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_binfiles" unique="true">
            <column ascending="true" name="ID"/>
         </index>
      </table>
      <table name="campaigns" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Campaign ID" size="10" type="int4">
            <child column="campaign" foreignKey="fk_mailinglists_campaign" implied="false" onDeleteCascade="false" schema="public" table="mailinglists"/>
            <child column="campaign" foreignKey="fk_opportunities_campaign" implied="false" onDeleteCascade="false" schema="public" table="opportunities"/>
            <child column="campaign" foreignKey="fk_participants_campaign" implied="false" onDeleteCascade="true" schema="public" table="participants"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_campaigns_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_campaigns_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_campaigns_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="7" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="8" name="datefrom" nullable="false" remarks="Start date as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be less than or equal to `dateto`" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="9" name="dateto" nullable="true" remarks="End date as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be greater than or equal to `datefrom`" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="status" nullable="false" remarks="Status (`0`=DRAFT, `1`=NOTSTARTED, `2`=AWAITINGAPPROVAL, `3`=APPROVED, `4`=DISMISSED, `5`=ACTIVE, `6`=INACTIVE, `7`=INEVALUATION, `8`=CANCELLED, `9`=CLOSED)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_campaigns" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_campaigns_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_campaigns_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_campaigns" unique="false">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="categories" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Category ID" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_categories_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_categories_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_categories_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="5" name="entity" nullable="false" remarks="Canonical entity" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="6" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_categories" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="u_categories_entity_name" unique="true">
            <column ascending="true" name="entity"/>
            <column ascending="true" name="name"/>
         </index>
         <index name="u_categories_ownergroup_entity_name" unique="true">
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="entity"/>
            <column ascending="true" name="name"/>
         </index>
         <index name="u_categories_owneruser_entity_name" unique="true">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="entity"/>
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="comments" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Comment ID" size="19" type="int8">
            <child column="comment" foreignKey="fk_files_comment" implied="false" onDeleteCascade="true" schema="public" table="files"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_comments_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="3" name="record" nullable="false" remarks="Record ID (**dependency**)" size="19" type="int8">
            <parent column="ID" foreignKey="fk_comments_record" implied="false" onDeleteCascade="true" schema="public" table="records"/>
         </column>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="4" name="sender" nullable="false" remarks="Sender" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="5" name="text" nullable="false" remarks="Comment text ([Markdown](http://en.wikipedia.org/wiki/Markdown) for rich text representation)" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_comments" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_comments_record" unique="false">
            <column ascending="true" name="record"/>
         </index>
         <index name="i_comments_creationdate" unique="false">
            <column ascending="true" name="creationdate"/>
         </index>
      </table>
      <table name="components" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Component ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_components_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="item" nullable="false" remarks="Item ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_components_item" implied="false" onDeleteCascade="true" schema="public" table="items"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="component" nullable="false" remarks="Component item ID; must be distinct from `item`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_components_component" implied="false" onDeleteCascade="true" schema="public" table="items"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="17" id="6" name="amount" nullable="false" remarks="Amount (quantity)" size="17" type="float8"/>
         <column autoUpdated="false" digits="17" id="7" name="price" nullable="true" remarks="Imputed price per unit" size="17" type="float8"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_components" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_components_component" unique="false">
            <column ascending="true" name="component"/>
         </index>
         <index name="u_components_item_component" unique="true">
            <column ascending="true" name="item"/>
            <column ascending="true" name="component"/>
         </index>
      </table>
      <table name="contacts" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Contact ID" size="10" type="int4">
            <child column="contact" foreignKey="fk_accounts_contact" implied="false" onDeleteCascade="false" schema="public" table="accounts"/>
            <child column="contact" foreignKey="fk_addresses_contact" implied="false" onDeleteCascade="true" schema="public" table="addresses"/>
            <child column="contact1" foreignKey="fk_contacts2contacts_contact1" implied="false" onDeleteCascade="true" schema="public" table="contacts2contacts"/>
            <child column="contact2" foreignKey="fk_contacts2contacts_contact2" implied="false" onDeleteCascade="true" schema="public" table="contacts2contacts"/>
            <child column="contact" foreignKey="fk_davids_contact" implied="false" onDeleteCascade="false" schema="public" table="davids"/>
            <child column="contact" foreignKey="fk_invitations_contact" implied="false" onDeleteCascade="false" schema="public" table="invitations"/>
            <child column="contact" foreignKey="fk_opportunities_contact" implied="false" onDeleteCascade="false" schema="public" table="opportunities"/>
            <child column="contact" foreignKey="fk_participants_contact" implied="false" onDeleteCascade="false" schema="public" table="participants"/>
            <child column="contact" foreignKey="fk_users_contact" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_contacts_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_contacts_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_contacts_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_contacts_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="6" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="7" name="picbinfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="9" name="lastname" nullable="false" remarks="Last name (surname or company name); is required if `firstname` is empty" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="10" name="firstname" nullable="false" remarks="First name (given name); is required if `lastname` is empty" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="type" nullable="false" remarks="Contact type (`0`=COMPANY, `1`=PERSON)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="12" name="title" nullable="false" remarks="Title or salutation (only for PERSON)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="13" name="company" nullable="false" remarks="Company name (only for PERSON)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="14" name="position" nullable="false" remarks="Position or job title (only for PERSON)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="15" name="department" nullable="false" remarks="Department (only for PERSON)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="16" name="address" nullable="false" remarks="Address (street and building/suite number)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="17" name="postalcode" nullable="false" remarks="Postal or ZIP code" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="18" name="city" nullable="false" remarks="City or municipality" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="19" name="region" nullable="false" remarks="Region or state" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::character varying" digits="0" id="20" name="country" nullable="false" remarks="Country code ([ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) (Pattern: `^([A-Z]{2})?$`)" size="2" type="varchar"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="21" name="phone" nullable="false" remarks="Primary phone number" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="22" name="phone2" nullable="false" remarks="Secondary phone number" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="23" name="cell" nullable="false" remarks="Cell phone number" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="24" name="fax" nullable="false" remarks="Fax number" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="25" name="email" nullable="false" remarks="Primary e-mail address" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="26" name="email2" nullable="false" remarks="Secondary e-mail address" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="27" name="website" nullable="false" remarks="Website URL" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="28" name="birthdate" nullable="true" remarks="Birth date as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (only for PERSON)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="29" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_contacts" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_contacts_lastname_firstname_ID" unique="false">
            <column ascending="true" name="lastname"/>
            <column ascending="true" name="firstname"/>
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_contacts_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_contacts_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_contacts" unique="false">
            <column ascending="true" name="lastname"/>
            <column ascending="true" name="firstname"/>
            <column ascending="true" name="company"/>
            <column ascending="true" name="email"/>
            <column ascending="true" name="email2"/>
         </index>
      </table>
      <table name="contacts2contacts" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Contact-to-contact ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_contacts2contacts_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="3" name="contact1" nullable="false" remarks="First contact ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_contacts2contacts_contact1" implied="false" onDeleteCascade="true" schema="public" table="contacts"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="contact2" nullable="false" remarks="Second contact ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_contacts2contacts_contact2" implied="false" onDeleteCascade="true" schema="public" table="contacts"/>
         </column>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_contacts2contacts" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_contacts2contacts_contact2" unique="false">
            <column ascending="true" name="contact2"/>
         </index>
         <index name="u_contacts2contacts_contact1_contact2" unique="true">
            <column ascending="true" name="contact1"/>
            <column ascending="true" name="contact2"/>
         </index>
      </table>
      <table name="contracts" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Contract ID" size="10" type="int4">
            <child column="contract" foreignKey="fk_transactions_contract" implied="false" onDeleteCascade="false" schema="public" table="transactions"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_contracts_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_contracts_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_contracts_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="account" nullable="true" remarks="Account ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_contracts_account" implied="false" onDeleteCascade="false" schema="public" table="accounts"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="8" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="9" name="contractnum" nullable="false" remarks="Contract number" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="10" name="datefrom" nullable="false" remarks="Start date as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be less than or equal to `dateto`" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="11" name="dateto" nullable="true" remarks="End date as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be greater than or equal to `datefrom`" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="12" name="datecancel" nullable="true" remarks="Cancellation date as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="status" nullable="false" remarks="Status (`0`=DRAFT, `1`=AWAITINGAPPROVAL, `2`=APPROVED, `3`=DISMISSED, `4`=ACTIVE, `5`=INACTIVE, `6`=EXPIRED, `7`=CANCELLED, `8`=CLOSED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="14" name="currency" nullable="false" remarks="Currency code ([ISO 4217](http://en.wikipedia.org/wiki/ISO_4217)) (Pattern: `^[A-Z]{3}$`)" size="3" type="varchar"/>
         <column autoUpdated="false" defaultValue="1" digits="17" id="15" name="exchangerate" nullable="false" remarks="Exchange rate as a multiple of one monetary unit of the fixed system currency" size="17" type="float8"/>
         <column autoUpdated="false" digits="0" id="16" name="billingcycle" nullable="true" remarks="Billing cycle in months" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="17" name="lastbilling" nullable="true" remarks="Last billing date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="18" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="19" name="billingitems" nullable="true" remarks="" size="2147483647" type="json"/>
         <column autoUpdated="false" digits="0" id="20" name="autobilling" nullable="true" remarks="" size="2147483647" type="json"/>
         <column autoUpdated="false" digits="0" id="21" name="procurementitems" nullable="true" remarks="" size="2147483647" type="json"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_contracts" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_contracts_account" unique="false">
            <column ascending="true" name="account"/>
         </index>
         <index name="i_contracts_autobilling" unique="false">
            <column ascending="true" name="status"/>
         </index>
         <index name="i_contracts_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_contracts_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_contracts" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="contractnum"/>
         </index>
      </table>
      <table name="couponcodes" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Coupon code ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_couponcodes_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="coupon" nullable="false" remarks="Coupon ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_couponcodes_coupon" implied="false" onDeleteCascade="true" schema="public" table="coupons"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="transaction" nullable="true" remarks="Transaction ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_couponcodes_transaction" implied="false" onDeleteCascade="false" schema="public" table="transactions"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="flag" nullable="false" remarks="Flag (`0`=BOOKED, `1`=RESERVED, `2`=CANCELLED)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="7" name="date" nullable="false" remarks="Designated date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="8" name="code" nullable="false" remarks="Coupon code" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="9" name="value" nullable="false" remarks="Value" size="17" type="float8"/>
         <column autoUpdated="false" digits="0" id="10" name="datefrom" nullable="true" remarks="Start date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be less than or equal to `dateto`" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="11" name="dateto" nullable="true" remarks="End date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be greater than or equal to `datefrom`" size="19" type="int8"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_couponcodes" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_couponcodes_code" unique="false">
            <column ascending="true" name="code"/>
         </index>
         <index name="fk_couponcodes_coupon" unique="false">
            <column ascending="true" name="coupon"/>
         </index>
         <index name="fk_couponcodes_transaction" unique="false">
            <column ascending="true" name="transaction"/>
         </index>
         <index name="s_couponcodes" unique="false">
            <column ascending="true" name="code"/>
         </index>
      </table>
      <table name="coupons" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Coupon ID" size="10" type="int4">
            <child column="coupon" foreignKey="fk_couponcodes_coupon" implied="false" onDeleteCascade="true" schema="public" table="couponcodes"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_coupons_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_coupons_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="activity" nullable="false" remarks="Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="6" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="type" nullable="false" remarks="Coupon type (`0`=PROMOTION, `1`=INDIVIDUAL)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="8" name="code" nullable="false" remarks="Promotion code (only for PROMOTION)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="9" name="value" nullable="false" remarks="Default value" size="17" type="float8"/>
         <column autoUpdated="false" digits="17" id="10" name="taxrate" nullable="true" remarks="Tax rate in percent" size="17" type="float8"/>
         <column autoUpdated="false" digits="0" id="11" name="datefrom" nullable="true" remarks="Start date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be less than or equal to `dateto`" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="12" name="dateto" nullable="true" remarks="End date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be greater than or equal to `datefrom`" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="13" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_coupons" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_coupons_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_coupons_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="s_coupons" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="code"/>
         </index>
         <index name="u_coupons_code" unique="true">
            <column ascending="true" name="code"/>
         </index>
      </table>
      <table name="davids" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="davserver" nullable="false" remarks="" size="10" type="int4">
            <parent column="ID" foreignKey="fk_davids_davserver" implied="false" onDeleteCascade="true" schema="public" table="davservers"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="contact" nullable="true" remarks="" size="10" type="int4">
            <parent column="ID" foreignKey="fk_davids_contact" implied="false" onDeleteCascade="false" schema="public" table="contacts"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="appointment" nullable="true" remarks="" size="10" type="int4">
            <parent column="ID" foreignKey="fk_davids_appointment" implied="false" onDeleteCascade="false" schema="public" table="appointments"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="task" nullable="true" remarks="" size="10" type="int4">
            <parent column="ID" foreignKey="fk_davids_task" implied="false" onDeleteCascade="false" schema="public" table="tasks"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="href" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="5" name="etag" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="6" name="vobject" nullable="false" remarks="" size="2147483647" type="text"/>
         <primaryKey column="davserver" sequenceNumberInPK="1"/>
         <primaryKey column="href" sequenceNumberInPK="2"/>
         <index name="pk_davids" unique="true">
            <column ascending="true" name="davserver"/>
            <column ascending="true" name="href"/>
         </index>
         <index name="i_davids_noassociation" unique="false">
            <column ascending="true" name="davserver"/>
         </index>
         <index name="u_davids_appointment" unique="true">
            <column ascending="true" name="appointment"/>
         </index>
         <index name="u_davids_contact" unique="true">
            <column ascending="true" name="contact"/>
         </index>
         <index name="u_davids_task" unique="true">
            <column ascending="true" name="task"/>
         </index>
      </table>
      <table name="davservers" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="DAV server ID" size="10" type="int4">
            <child column="davserver" foreignKey="fk_davids_davserver" implied="false" onDeleteCascade="true" schema="public" table="davids"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_davservers_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_davservers_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_davservers_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="recipientuser" nullable="true" remarks="Recipient user ID (PUBLIC if `recipientuser`=`null` and `recipientgroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_davservers_recipientuser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="recipientgroup" nullable="true" remarks="Recipient group ID (PUBLIC if `recipientuser`=`null` and `recipientgroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_davservers_recipientgroup" implied="false" onDeleteCascade="false" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="activity" nullable="false" remarks="Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="9" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="type" nullable="false" remarks="Collection type (`0`=CONTACTS, `2`=APPOINTMENTS, `1`=TASKS)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="11" name="url" nullable="false" remarks="Endpoint URL" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="12" name="username" nullable="false" remarks="Username" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="13" name="password" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="14" name="ctag" nullable="false" remarks="Collection entity tag (CTag) ([caldav-ctag-03](http://github.com/apple/ccs-calendarserver/doc/Extensions/caldav-ctag.txt))" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="15" name="synctoken" nullable="false" remarks="Synchronization token ([RFC 6578](http://tools.ietf.org/html/rfc6578#section-4))" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="16" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_davservers" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_davservers_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_davservers_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="s_davservers" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="url"/>
            <column ascending="true" name="username"/>
         </index>
      </table>
      <table name="dunning" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Dunning notice ID" size="10" type="int4">
            <child column="dunning" foreignKey="fk_dunning2transactions_dunning" implied="false" onDeleteCascade="true" schema="public" table="dunning2transactions"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_dunning_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_dunning_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_dunning_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="account" nullable="true" remarks="Account ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_dunning_account" implied="false" onDeleteCascade="false" schema="public" table="accounts"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="dunningnum" nullable="false" remarks="Dunning number" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="8" name="date" nullable="false" remarks="Designated date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="9" name="duedate" nullable="true" remarks="Due date as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="status" nullable="false" remarks="Status (`0`=DRAFT, `1`=BOOKED, `2`=CANCELLED, `3`=CLOSED)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="level" nullable="false" remarks="Dunning level (`0`=REMINDER, `1`=INITIAL, `2`=INTERMEDIATE, `3`=FINAL)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="12" name="recipient" nullable="false" remarks="Recipient" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="13" name="address" nullable="false" remarks="Address (street and building/suite number)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="14" name="postalcode" nullable="false" remarks="Postal or ZIP code" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="15" name="city" nullable="false" remarks="City or municipality" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="16" name="region" nullable="false" remarks="Region or state" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::character varying" digits="0" id="17" name="country" nullable="false" remarks="Country code ([ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) (Pattern: `^([A-Z]{2})?$`)" size="2" type="varchar"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_dunning" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_dunning_account" unique="false">
            <column ascending="true" name="account"/>
         </index>
         <index name="i_dunning_date_ID" unique="false">
            <column ascending="false" name="date"/>
            <column ascending="false" name="ID"/>
         </index>
         <index name="i_dunning_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_dunning_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_dunning" unique="false">
            <column ascending="true" name="dunningnum"/>
         </index>
         <index name="u_dunning_dunningnum" unique="true">
            <column ascending="true" name="dunningnum"/>
         </index>
      </table>
      <table name="dunning2transactions" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Dunning-to-transaction ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_dunning2transactions_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="3" name="dunning" nullable="false" remarks="Dunning notice ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_dunning2transactions_dunning" implied="false" onDeleteCascade="true" schema="public" table="dunning"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="transaction" nullable="false" remarks="Transaction ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_dunning2transactions_transaction" implied="false" onDeleteCascade="true" schema="public" table="transactions"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="17" id="5" name="fee" nullable="false" remarks="Transaction-specific dunning fee" size="17" type="float8"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_dunning2transactions" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_dunning2transactions_transaction" unique="false">
            <column ascending="true" name="transaction"/>
         </index>
         <index name="u_dunning2transactions_dunning_transaction" unique="true">
            <column ascending="true" name="dunning"/>
            <column ascending="true" name="transaction"/>
            <column ascending="true" name="fee"/>
         </index>
      </table>
      <table name="events" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Event ID" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_events_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_events_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_events_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="entity" nullable="true" remarks="Canonical entity" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="index" nullable="true" remarks="Entity ID; is required if `entity` is not `null`, otherwise must be `null`" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="8" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::character varying" digits="0" id="9" name="color" nullable="false" remarks="Color code (CSS-style hexadecimal without `#`) (Pattern: `^([A-F\d]{3}){0,2}$`)" size="6" type="varchar"/>
         <column autoUpdated="false" digits="0" id="10" name="datefrom" nullable="false" remarks="Start date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be less than or equal to `dateto`" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="11" name="dateto" nullable="false" remarks="End date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be greater than or equal to `datefrom`" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="12" name="meta" nullable="true" remarks="" size="2147483647" type="json"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_events" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_events_datefrom_dateto" unique="false">
            <column ascending="true" name="datefrom"/>
            <column ascending="true" name="dateto"/>
         </index>
         <index name="i_events_entity_index" unique="false">
            <column ascending="true" name="entity"/>
            <column ascending="true" name="index"/>
         </index>
         <index name="i_events_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_events_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
         </index>
      </table>
      <table name="extdata" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT extdatafields.entity,&#10;    extdatafields.name,&#10;    extdatavalues.index,&#10;    extdatavalues.value,&#10;    extdatavalues.number&#10;   FROM (extdatavalues&#10;     JOIN extdatafields ON ((extdatafields.&quot;ID&quot; = extdatavalues.field)));">
         <column autoUpdated="false" digits="0" id="0" name="entity" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="2" name="index" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="3" name="value" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="number" nullable="true" remarks="" size="131089" type="numeric"/>
      </table>
      <table name="extdataempty" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="field" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="index" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="2" name="value" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="number" nullable="true" remarks="" size="131089" type="numeric"/>
         <primaryKey column="field" sequenceNumberInPK="1"/>
         <primaryKey column="index" sequenceNumberInPK="2"/>
         <index name="pk_extdataempty" unique="true">
            <column ascending="true" name="field"/>
            <column ascending="true" name="index"/>
         </index>
      </table>
      <table name="extdatafields" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="entity" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_extdatafields" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="u_extdatafields_entity_name" unique="true">
            <column ascending="true" name="entity"/>
            <column ascending="true" name="name"/>
            <column ascending="true" name="ID"/>
         </index>
      </table>
      <table name="extdataregular" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="field" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="index" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="2" name="value" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="number" nullable="true" remarks="" size="131089" type="numeric"/>
         <primaryKey column="field" sequenceNumberInPK="1"/>
         <primaryKey column="index" sequenceNumberInPK="2"/>
         <index name="pk_extdataregular" unique="true">
            <column ascending="true" name="field"/>
            <column ascending="true" name="index"/>
         </index>
      </table>
      <table name="extdatavalues" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="field" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="index" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="2" name="value" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="number" nullable="true" remarks="" size="131089" type="numeric"/>
      </table>
      <table name="feedids" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="feedserver" nullable="false" remarks="" size="10" type="int4">
            <parent column="ID" foreignKey="fk_feedids_feedserver" implied="false" onDeleteCascade="true" schema="public" table="feedservers"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="record" nullable="true" remarks="" size="19" type="int8">
            <parent column="ID" foreignKey="fk_feedids_record" implied="false" onDeleteCascade="false" schema="public" table="records"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="uuid" nullable="false" remarks="" size="2147483647" type="text"/>
         <primaryKey column="feedserver" sequenceNumberInPK="1"/>
         <primaryKey column="uuid" sequenceNumberInPK="2"/>
         <index name="pk_feedids" unique="true">
            <column ascending="true" name="feedserver"/>
            <column ascending="true" name="uuid"/>
         </index>
         <index name="u_feedids_record" unique="true">
            <column ascending="true" name="record"/>
         </index>
      </table>
      <table name="feedservers" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Feed server ID" size="10" type="int4">
            <child column="feedserver" foreignKey="fk_feedids_feedserver" implied="false" onDeleteCascade="true" schema="public" table="feedids"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_feedservers_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_feedservers_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_feedservers_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="recipientuser" nullable="true" remarks="Recipient user ID (PUBLIC if `recipientuser`=`null` and `recipientgroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_feedservers_recipientuser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="recipientgroup" nullable="true" remarks="Recipient group ID (PUBLIC if `recipientuser`=`null` and `recipientgroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_feedservers_recipientgroup" implied="false" onDeleteCascade="false" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="activity" nullable="false" remarks="Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="9" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="10" name="url" nullable="false" remarks="Feed URL" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="username" nullable="false" remarks="Username" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="12" name="password" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="13" name="etag" nullable="false" remarks="Entity tag (ETag) ([RFC 7232](http://tools.ietf.org/html/rfc7232#section-2.3))" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="14" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="notify" nullable="false" remarks="Notify about new records" size="5" type="int2"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_feedservers" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_feedservers_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_feedservers_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="s_feedservers" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="url"/>
         </index>
      </table>
      <table name="fields" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="user" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="view" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="data" nullable="false" remarks="" size="2147483647" type="text"/>
         <primaryKey column="user" sequenceNumberInPK="1"/>
         <primaryKey column="view" sequenceNumberInPK="2"/>
         <primaryKey column="name" sequenceNumberInPK="3"/>
         <index name="pk_fields" unique="true">
            <column ascending="true" name="user"/>
            <column ascending="true" name="view"/>
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="files" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="File ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_files_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="3" name="record" nullable="true" remarks="Record ID (**dependency**); is mutually exclusive to `comment` (either one is required)" size="19" type="int8">
            <parent column="ID" foreignKey="fk_files_record" implied="false" onDeleteCascade="true" schema="public" table="records"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="comment" nullable="true" remarks="Comment ID (**dependency**); is mutually exclusive to `record` (either one is required)" size="19" type="int8">
            <parent column="ID" foreignKey="fk_files_comment" implied="false" onDeleteCascade="true" schema="public" table="comments"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="binfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="6" name="filename" nullable="false" remarks="Filename" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="'application/octet-stream'::text" digits="0" id="7" name="mimetype" nullable="false" remarks="[MIME type](http://en.wikipedia.org/wiki/Media_type) ([RFC 2045](http://tools.ietf.org/html/rfc2045)) (Pattern: `^[a-z]+/[^ \t\v\r\n]+$`)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="size" nullable="false" remarks="Size in bytes" size="10" type="int4"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_files" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_files_comment" unique="false">
            <column ascending="true" name="comment"/>
         </index>
         <index name="fk_files_record" unique="false">
            <column ascending="true" name="record"/>
         </index>
         <index name="s_files" unique="false">
            <column ascending="true" name="filename"/>
         </index>
      </table>
      <table name="filters" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="user" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="view" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="data" nullable="false" remarks="" size="2147483647" type="text"/>
         <primaryKey column="user" sequenceNumberInPK="1"/>
         <primaryKey column="view" sequenceNumberInPK="2"/>
         <primaryKey column="name" sequenceNumberInPK="3"/>
         <index name="pk_filters" unique="true">
            <column ascending="true" name="user"/>
            <column ascending="true" name="view"/>
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="follows" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Follow ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="false" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_follows_creator" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="3" name="entity" nullable="false" remarks="Canonical entity" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="index" nullable="false" remarks="Entity ID" size="19" type="int8"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_follows" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="u_follows_entity_creator_index" unique="true">
            <column ascending="true" name="entity"/>
            <column ascending="true" name="creator"/>
            <column ascending="true" name="index"/>
         </index>
      </table>
      <table name="groups" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Group ID" size="10" type="int4">
            <child column="ownergroup" foreignKey="fk_accounts_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="accounts"/>
            <child column="ownergroup" foreignKey="fk_actionsteps_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="actionsteps"/>
            <child column="ownergroup" foreignKey="fk_appointments_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="appointments"/>
            <child column="ownergroup" foreignKey="fk_campaigns_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="campaigns"/>
            <child column="ownergroup" foreignKey="fk_categories_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="categories"/>
            <child column="ownergroup" foreignKey="fk_contacts_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="contacts"/>
            <child column="ownergroup" foreignKey="fk_contracts_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="contracts"/>
            <child column="ownergroup" foreignKey="fk_coupons_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="coupons"/>
            <child column="ownergroup" foreignKey="fk_davservers_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="davservers"/>
            <child column="recipientgroup" foreignKey="fk_davservers_recipientgroup" implied="false" onDeleteCascade="false" schema="public" table="davservers"/>
            <child column="ownergroup" foreignKey="fk_dunning_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="dunning"/>
            <child column="ownergroup" foreignKey="fk_events_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="events"/>
            <child column="ownergroup" foreignKey="fk_feedservers_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="feedservers"/>
            <child column="recipientgroup" foreignKey="fk_feedservers_recipientgroup" implied="false" onDeleteCascade="false" schema="public" table="feedservers"/>
            <child column="group" foreignKey="fk_groups2users_group" implied="false" onDeleteCascade="true" schema="public" table="groups2users"/>
            <child column="ownergroup" foreignKey="fk_items_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="items"/>
            <child column="ownergroup" foreignKey="fk_ledgers_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="ledgers"/>
            <child column="ownergroup" foreignKey="fk_links_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="links"/>
            <child column="ownergroup" foreignKey="fk_mailinglists_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="mailinglists"/>
            <child column="ownergroup" foreignKey="fk_mailservers_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="mailservers"/>
            <child column="recipientgroup" foreignKey="fk_mailservers_recipientgroup" implied="false" onDeleteCascade="false" schema="public" table="mailservers"/>
            <child column="ownergroup" foreignKey="fk_messages_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="messages"/>
            <child column="ownergroup" foreignKey="fk_notes_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="notes"/>
            <child column="ownergroup" foreignKey="fk_objects_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="objects"/>
            <child column="ownergroup" foreignKey="fk_opportunities_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="opportunities"/>
            <child column="ownergroup" foreignKey="fk_payments_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="payments"/>
            <child column="group" foreignKey="fk_permissions_group" implied="false" onDeleteCascade="true" schema="public" table="permissions"/>
            <child column="ownergroup" foreignKey="fk_pricelists_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="pricelists"/>
            <child column="ownergroup" foreignKey="fk_projects_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="projects"/>
            <child column="ownergroup" foreignKey="fk_records_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="records"/>
            <child column="ownergroup" foreignKey="fk_storages_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="storages"/>
            <child column="ownergroup" foreignKey="fk_tasks_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="tasks"/>
            <child column="ownergroup" foreignKey="fk_tickets_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="tickets"/>
            <child column="ownergroup" foreignKey="fk_transactions_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="transactions"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_groups_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="leader" nullable="true" remarks="Leader user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_groups_leader" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="activity" nullable="false" remarks="Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="6" name="name" nullable="false" remarks="Name (case-insensitively unique)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="7" name="description" nullable="false" remarks="" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_groups" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="s_groups" unique="false">
            <column ascending="true" name="name"/>
         </index>
         <index name="u_groups_name" unique="true"/>
      </table>
      <table name="groups2users" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Group-to-user ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_groups2users_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="group" nullable="false" remarks="Group ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_groups2users_group" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="user" nullable="false" remarks="User ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_groups2users_user" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="writable" nullable="false" remarks="Allow writing of group-owned data by user" size="5" type="int2"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_groups2users" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_groups2users_user" unique="false">
            <column ascending="true" name="user"/>
         </index>
         <index name="u_groups2users_group_user" unique="true">
            <column ascending="true" name="group"/>
            <column ascending="true" name="user"/>
         </index>
      </table>
      <table name="imapids" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="mailserver" nullable="false" remarks="" size="10" type="int4">
            <parent column="ID" foreignKey="fk_imapids_mailserver" implied="false" onDeleteCascade="true" schema="public" table="mailservers"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="mailbox" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="2" name="uidvalidity" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="3" name="uid" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="4" name="message" nullable="true" remarks="" size="10" type="int4">
            <parent column="ID" foreignKey="fk_imapids_message" implied="false" onDeleteCascade="false" schema="public" table="messages"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="hash" nullable="false" remarks="" size="32" type="varchar"/>
         <primaryKey column="mailserver" sequenceNumberInPK="1"/>
         <primaryKey column="mailbox" sequenceNumberInPK="2"/>
         <primaryKey column="uidvalidity" sequenceNumberInPK="3"/>
         <primaryKey column="uid" sequenceNumberInPK="4"/>
         <index name="pk_imapids" unique="true">
            <column ascending="true" name="mailserver"/>
            <column ascending="true" name="mailbox"/>
            <column ascending="true" name="uidvalidity"/>
            <column ascending="true" name="uid"/>
         </index>
         <index name="u_imapids_mailserver_hash" unique="true">
            <column ascending="true" name="mailserver"/>
            <column ascending="true" name="hash"/>
         </index>
         <index name="u_imapids_message" unique="true">
            <column ascending="true" name="message"/>
         </index>
      </table>
      <table name="imports" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="user" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="date" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="3" name="settings" nullable="true" remarks="" size="2147483647" type="json"/>
         <column autoUpdated="false" digits="0" id="4" name="entity" nullable="false" remarks="" size="2147483647" type="text"/>
         <primaryKey column="user" sequenceNumberInPK="1"/>
         <primaryKey column="entity" sequenceNumberInPK="2"/>
         <primaryKey column="name" sequenceNumberInPK="3"/>
         <index name="pk_imports" unique="true">
            <column ascending="true" name="user"/>
            <column ascending="true" name="entity"/>
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="invitations" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Invitation ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_invitations_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="appointment" nullable="false" remarks="Appointment ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_invitations_appointment" implied="false" onDeleteCascade="true" schema="public" table="appointments"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="contact" nullable="true" remarks="Contact ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_invitations_contact" implied="false" onDeleteCascade="false" schema="public" table="contacts"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="7" name="email" nullable="false" remarks="E-mail address" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="flag" nullable="false" remarks="Flag (`0`=UNANSWERED, `1`=CONFIRMED, `2`=REJECTED)" size="5" type="int2"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_invitations" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_invitations_appointment" unique="false">
            <column ascending="true" name="appointment"/>
         </index>
         <index name="fk_invitations_contact" unique="false">
            <column ascending="true" name="contact"/>
         </index>
      </table>
      <table name="items" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Item ID" size="10" type="int4">
            <child column="component" foreignKey="fk_components_component" implied="false" onDeleteCascade="true" schema="public" table="components"/>
            <child column="item" foreignKey="fk_components_item" implied="false" onDeleteCascade="true" schema="public" table="components"/>
            <child column="model" foreignKey="fk_items_model" implied="false" onDeleteCascade="false" schema="public" table="items"/>
            <child column="item" foreignKey="fk_prices_item" implied="false" onDeleteCascade="true" schema="public" table="prices"/>
            <child column="item" foreignKey="fk_stocktransactions_item" implied="false" onDeleteCascade="true" schema="public" table="stocktransactions"/>
            <child column="item" foreignKey="fk_suppliers_item" implied="false" onDeleteCascade="true" schema="public" table="suppliers"/>
            <child column="item" foreignKey="fk_transactions_item" implied="false" onDeleteCascade="true" schema="public" table="transactions"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_items_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_items_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="5" name="model" nullable="true" remarks="Model item ID (only for non-MODEL)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_items_model" implied="false" onDeleteCascade="false" schema="public" table="items"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="picbinfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="8" name="name" nullable="false" remarks="Product name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="9" name="manufacturer" nullable="false" remarks="Manufacturer (brand or company name)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="10" name="itemnum" nullable="false" remarks="Item number (SKU)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="barcode" nullable="false" remarks="Barcode (e.g. UPC or EAN/GTIN)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="type" nullable="false" remarks="Item type (`0`=SIMPLE, `1`=SERIALS, `2`=CHARGES, `3`=SERIALSANDCHARGES, `4`=SET, `5`=CONTAINER, `6`=NOSTOCK, `7`=MODEL)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="13" name="forcestock" nullable="true" remarks="Force stock check on depletion (`0`=STORAGE, `1`=LOCATION)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::character varying" digits="0" id="14" name="unit" nullable="false" remarks="Unit code ([UN/CEFACT Recommendation 20](http://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf))" size="3" type="varchar"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="15" name="sellingprice" nullable="false" remarks="Default selling price per unit" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="16" name="purchaseprice" nullable="false" remarks="Default purchase price per unit" size="17" type="float8"/>
         <column autoUpdated="false" digits="17" id="17" name="taxrate" nullable="true" remarks="Tax rate in percent" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="18" name="weight" nullable="false" remarks="Shipping weight per unit in kilogram" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="19" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_items" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_items_model" unique="false">
            <column ascending="true" name="model"/>
         </index>
         <index name="i_items_barcode" unique="false">
            <column ascending="true" name="barcode"/>
         </index>
         <index name="i_items_itemnum_ID" unique="false">
            <column ascending="true" name="itemnum"/>
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_items_name_ID" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_items_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_items_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="s_items" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="manufacturer"/>
            <column ascending="true" name="itemnum"/>
            <column ascending="true" name="barcode"/>
         </index>
      </table>
      <table name="ledgers" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Ledger ID" size="10" type="int4">
            <child column="ledger" foreignKey="fk_payments_ledger" implied="false" onDeleteCascade="false" schema="public" table="payments"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_ledgers_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_ledgers_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="6" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="7" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_ledgers" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_ledgers_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_ledgers_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="s_ledgers" unique="false">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="likes" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Like ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="false" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_likes_creator" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="3" name="record" nullable="false" remarks="Record ID (**dependency**)" size="19" type="int8">
            <parent column="ID" foreignKey="fk_likes_record" implied="false" onDeleteCascade="true" schema="public" table="records"/>
         </column>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_likes" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="u_likes_record_creator" unique="true">
            <column ascending="true" name="record"/>
            <column ascending="true" name="creator"/>
         </index>
      </table>
      <table name="links" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Link ID" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_links_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_links_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_links_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_links_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="6" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="8" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="9" name="url" nullable="false" remarks="URL" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="10" name="username" nullable="false" remarks="Username" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="password" nullable="false" remarks="Password" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="visits" nullable="false" remarks="Number of visits" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="13" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_links" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_links_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_links_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_links" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="url"/>
         </index>
      </table>
      <table name="mailinglists" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Mailing list ID" size="10" type="int4">
            <child column="mailinglist" foreignKey="fk_messages_mailinglist" implied="false" onDeleteCascade="false" schema="public" table="messages"/>
            <child column="mailinglist" foreignKey="fk_participants_mailinglist" implied="false" onDeleteCascade="true" schema="public" table="participants"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_mailinglists_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_mailinglists_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_mailinglists_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_mailinglists_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="6" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="7" name="campaign" nullable="true" remarks="Campaign ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_mailinglists_campaign" implied="false" onDeleteCascade="false" schema="public" table="campaigns"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="9" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="10" name="sender" nullable="false" remarks="Sender name and e-mail address" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_mailinglists" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_mailinglists_campaign" unique="false">
            <column ascending="true" name="campaign"/>
         </index>
         <index name="i_mailinglists_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_mailinglists_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_mailinglists" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="sender"/>
         </index>
      </table>
      <table name="mailservers" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Mail server ID" size="10" type="int4">
            <child column="mailserver" foreignKey="fk_imapids_mailserver" implied="false" onDeleteCascade="true" schema="public" table="imapids"/>
            <child column="mailserver" foreignKey="fk_messages_mailserver" implied="false" onDeleteCascade="false" schema="public" table="messages"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_mailservers_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_mailservers_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_mailservers_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="recipientuser" nullable="true" remarks="Recipient user ID (PUBLIC if `recipientuser`=`null` and `recipientgroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_mailservers_recipientuser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="recipientgroup" nullable="true" remarks="Recipient group ID (PUBLIC if `recipientuser`=`null` and `recipientgroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_mailservers_recipientgroup" implied="false" onDeleteCascade="false" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="autoreplybinfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="9" name="signaturebinfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="activity" nullable="false" remarks="Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="11" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="12" name="sender" nullable="false" remarks="Sender name and e-mail address" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="13" name="serverin" nullable="false" remarks="Server (Inbound)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="14" name="usernamein" nullable="false" remarks="Username (Inbound)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="15" name="passwordin" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="16" name="serverout" nullable="false" remarks="Server (Outbound)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="17" name="usernameout" nullable="false" remarks="Username (Outbound)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="18" name="passwordout" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="19" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="20" name="ticketing" nullable="true" remarks="" size="2147483647" type="json"/>
         <column autoUpdated="false" digits="0" id="21" name="folders" nullable="true" remarks="" size="2147483647" type="json"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_mailservers" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_mailservers_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_mailservers_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="s_mailservers" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="sender"/>
            <column ascending="true" name="serverin"/>
            <column ascending="true" name="serverout"/>
         </index>
      </table>
      <table name="messagereads" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Message-read ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="false" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_messagereads_creator" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="3" name="message" nullable="false" remarks="Message ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_messagereads_message" implied="false" onDeleteCascade="true" schema="public" table="messages"/>
         </column>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_messagereads" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="u_messagereads_message_creator" unique="true">
            <column ascending="true" name="message"/>
            <column ascending="true" name="creator"/>
         </index>
      </table>
      <table name="messages" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Message ID" size="10" type="int4">
            <child column="message" foreignKey="fk_imapids_message" implied="false" onDeleteCascade="false" schema="public" table="imapids"/>
            <child column="message" foreignKey="fk_messagereads_message" implied="false" onDeleteCascade="true" schema="public" table="messagereads"/>
            <child column="reference" foreignKey="fk_messages_reference" implied="false" onDeleteCascade="false" schema="public" table="messages"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_messages_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_messages_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_messages_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="mailserver" nullable="true" remarks="Mail server ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_messages_mailserver" implied="false" onDeleteCascade="false" schema="public" table="mailservers"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="ticket" nullable="true" remarks="Ticket ID; is mutually exclusive to `opportunity`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_messages_ticket" implied="false" onDeleteCascade="false" schema="public" table="tickets"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="opportunity" nullable="true" remarks="Opportunity ID; is mutually exclusive to `ticket`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_messages_opportunity" implied="false" onDeleteCascade="false" schema="public" table="opportunities"/>
         </column>
         <column autoUpdated="false" digits="0" id="9" name="mailinglist" nullable="true" remarks="Mailing list ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_messages_mailinglist" implied="false" onDeleteCascade="false" schema="public" table="mailinglists"/>
         </column>
         <column autoUpdated="false" digits="0" id="10" name="reference" nullable="true" remarks="Reference message (reply-to) ID; must be distinct from `ID`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_messages_reference" implied="false" onDeleteCascade="false" schema="public" table="messages"/>
         </column>
         <column autoUpdated="false" digits="0" id="11" name="binfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="mailbox" nullable="false" remarks="Type (`0`=INBOX, `1`=DRAFTS, `2`=SENT, `3`=TEMPLATES, `4`=MAILINGS, `5`=ARCHIVE, `6`=TRASH, `7`=JUNK)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="13" name="date" nullable="false" remarks="Designated date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="14" name="subject" nullable="false" remarks="Subject" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="15" name="sender" nullable="false" remarks="Sender name and e-mail address" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="16" name="sender_email" nullable="false" remarks="Sender e-mail address" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="17" name="sender_name" nullable="false" remarks="Sender name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="18" name="to" nullable="false" remarks="All regular recipient names and e-mail addresses" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="19" name="to_email" nullable="false" remarks="First regular recipient e-mail address" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="20" name="to_name" nullable="false" remarks="First regular recipient name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="to_count" nullable="false" remarks="Number of regular recipients" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="22" name="cc" nullable="false" remarks="All carbon copy recipient names and e-mail addresses" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="23" name="bcc" nullable="false" remarks="All blind carbon copy recipient names and e-mail addresses" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="24" name="contenttype" nullable="false" remarks="Content [MIME type](http://en.wikipedia.org/wiki/Media_type) ([RFC 2045](http://tools.ietf.org/html/rfc2045))" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="25" name="size" nullable="false" remarks="Size in bytes" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="26" name="text" nullable="false" remarks="Plain text version of content" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="27" name="senddate" nullable="true" remarks="Scheduled send date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="28" name="senderror" nullable="false" remarks="Last error message from failure to send" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_messages" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_messages_mailinglist" unique="false">
            <column ascending="true" name="mailinglist"/>
         </index>
         <index name="fk_messages_mailserver" unique="false">
            <column ascending="true" name="mailserver"/>
         </index>
         <index name="fk_messages_opportunity" unique="false">
            <column ascending="true" name="opportunity"/>
         </index>
         <index name="fk_messages_reference" unique="false">
            <column ascending="true" name="reference"/>
         </index>
         <index name="fk_messages_ticket" unique="false">
            <column ascending="true" name="ticket"/>
         </index>
         <index name="i_messages_date_ID" unique="false">
            <column ascending="false" name="date"/>
            <column ascending="false" name="ID"/>
         </index>
         <index name="i_messages_mailbox" unique="false">
            <column ascending="true" name="mailbox"/>
         </index>
         <index name="i_messages_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_messages_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="s_messages" unique="false">
            <column ascending="true" name="subject"/>
            <column ascending="true" name="sender"/>
            <column ascending="true" name="to"/>
         </index>
      </table>
      <table name="notes" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Note ID" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_notes_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_notes_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_notes_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_notes_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="6" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="7" name="binfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="9" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="status" nullable="false" remarks="" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="contenttype" nullable="false" remarks="Content [MIME type](http://en.wikipedia.org/wiki/Media_type) ([RFC 2045](http://tools.ietf.org/html/rfc2045))" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="size" nullable="false" remarks="Size in bytes" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="13" name="text" nullable="false" remarks="Plain text version of content" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="14" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_notes" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_notes_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_notes_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_notes" unique="false">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="notifications" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="user" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="record" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="2" name="date" nullable="false" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="flag" nullable="false" remarks="" size="5" type="int2"/>
         <primaryKey column="user" sequenceNumberInPK="1"/>
         <primaryKey column="record" sequenceNumberInPK="2"/>
         <index name="pk_notifications" unique="true">
            <column ascending="true" name="user"/>
            <column ascending="true" name="record"/>
         </index>
         <index name="i_notifications_user_date_record" unique="false">
            <column ascending="true" name="user"/>
            <column ascending="false" name="date"/>
            <column ascending="false" name="record"/>
         </index>
      </table>
      <table name="numcounters" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="identifier" nullable="false" remarks="" size="2147483647" type="text">
            <child column="identifier" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" schema="public" table="permissions"/>
            <child column="identifier" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" schema="public" table="tokens"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="counter" nullable="false" remarks="" size="10" type="int4"/>
         <primaryKey column="identifier" sequenceNumberInPK="1"/>
         <index name="pk_numcounters" unique="true">
            <column ascending="true" name="identifier"/>
         </index>
      </table>
      <table name="objects" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Object ID" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_objects_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_objects_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_objects_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_objects_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="6" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="7" name="binfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="9" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="10" name="entity" nullable="false" remarks="Custom entity" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="12" name="data" nullable="true" remarks="" size="2147483647" type="json"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_objects" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_objects_entity" unique="false">
            <column ascending="true" name="entity"/>
         </index>
         <index name="i_objects_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_objects_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_objects" unique="false">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="opportunities" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Opportunity ID" size="10" type="int4">
            <child column="opportunity" foreignKey="fk_messages_opportunity" implied="false" onDeleteCascade="false" schema="public" table="messages"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_opportunities_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_opportunities_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_opportunities_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="account" nullable="true" remarks="Account ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_opportunities_account" implied="false" onDeleteCascade="false" schema="public" table="accounts"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="contact" nullable="true" remarks="Contact ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_opportunities_contact" implied="false" onDeleteCascade="false" schema="public" table="contacts"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="campaign" nullable="true" remarks="Campaign ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_opportunities_campaign" implied="false" onDeleteCascade="false" schema="public" table="campaigns"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="10" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="opportunitynum" nullable="false" remarks="Opportunity number" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="12" name="duedate" nullable="true" remarks="Due date as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="status" nullable="false" remarks="Status (`0`=UNEVALUATED, `1`=ELIGIBLE, `2`=FEEDBACKREQUIRED, `3`=INNEGOTIATION, `4`=OFFERED, `5`=ACCEPTED, `6`=REJECTED)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="2" digits="0" id="14" name="priority" nullable="false" remarks="Priority (`0`=LOWEST, `1`=LOW, `2`=MEDIUM, `3`=HIGH, `4`=HIGHEST)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="probability" nullable="false" remarks="Probability of success in percent; must be `100` for ACCEPTED" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="16" name="worstcase" nullable="false" remarks="Worst-case monetary outcome" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="17" name="mostlikely" nullable="false" remarks="Most likely monetary outcome" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="18" name="upside" nullable="false" remarks="Upside monetary outcome" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="19" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_opportunities" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_opportunities_account" unique="false">
            <column ascending="true" name="account"/>
         </index>
         <index name="fk_opportunities_campaign" unique="false">
            <column ascending="true" name="campaign"/>
         </index>
         <index name="fk_opportunities_contact" unique="false">
            <column ascending="true" name="contact"/>
         </index>
         <index name="i_opportunities_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_opportunities_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_opportunities" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="opportunitynum"/>
         </index>
      </table>
      <table name="participants" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Particpants ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_participants_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="mailinglist" nullable="true" remarks="Mailing list ID (**dependency**); is mutually exclusive to `campaign` (either one is required)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_participants_mailinglist" implied="false" onDeleteCascade="true" schema="public" table="mailinglists"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="campaign" nullable="true" remarks="Campaign ID (**dependency**); is mutually exclusive to `mailinglist` (either one is required)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_participants_campaign" implied="false" onDeleteCascade="true" schema="public" table="campaigns"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="contact" nullable="true" remarks="Contact ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_participants_contact" implied="false" onDeleteCascade="false" schema="public" table="contacts"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="8" name="phone" nullable="false" remarks="Phone number" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="9" name="email" nullable="false" remarks="E-mail address" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_participants" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_participants_campaign" unique="false">
            <column ascending="true" name="campaign"/>
         </index>
         <index name="fk_participants_contact" unique="false">
            <column ascending="true" name="contact"/>
         </index>
         <index name="fk_participants_mailinglist" unique="false">
            <column ascending="true" name="mailinglist"/>
         </index>
         <index name="s_participants" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="email"/>
         </index>
      </table>
      <table name="payments" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Payment ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_payments_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_payments_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_payments_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="ledger" nullable="true" remarks="Ledger ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_payments_ledger" implied="false" onDeleteCascade="false" schema="public" table="ledgers"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="transaction" nullable="true" remarks="Transaction ID; is mutually exclusive to `account`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_payments_transaction" implied="false" onDeleteCascade="false" schema="public" table="transactions"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="account" nullable="true" remarks="Account ID; is mutually exclusive to `transaction`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_payments_account" implied="false" onDeleteCascade="false" schema="public" table="accounts"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="9" name="date" nullable="false" remarks="Designated date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="10" name="subject" nullable="false" remarks="Subject (e.g. bank statement or reference number)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="status" nullable="false" remarks="Status (`0`=DRAFT, `1`=COMPLETED, `2`=CANCELLED, `3`=BOOKED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="17" id="12" name="amount" nullable="false" remarks="Amount (monetary); must not be zero" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="autoadvance" nullable="false" remarks="Auto-advance to next transaction" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="14" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_payments" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_payments_account" unique="false">
            <column ascending="true" name="account"/>
         </index>
         <index name="fk_payments_ledger" unique="false">
            <column ascending="true" name="ledger"/>
         </index>
         <index name="fk_payments_transaction" unique="false">
            <column ascending="true" name="transaction"/>
         </index>
         <index name="i_payments_date_ID" unique="false">
            <column ascending="false" name="date"/>
            <column ascending="false" name="ID"/>
         </index>
         <index name="i_payments_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_payments_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_payments" unique="false">
            <column ascending="true" name="subject"/>
         </index>
      </table>
      <table name="permissions" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Permission ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_permissions_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="group" nullable="false" remarks="Group ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_permissions_group" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="identifier" nullable="false" remarks="Permission identifier (Pattern: `^[\w.:-]+$`)" size="2147483647" type="text">
            <parent column="identifier" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" schema="public" table="numcounters"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="writable" nullable="false" remarks="Allow writing of permission-specific data by group members" size="5" type="int2"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_permissions" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="u_permissions_group_identifier" unique="true">
            <column ascending="true" name="group"/>
            <column ascending="true" name="identifier"/>
         </index>
      </table>
      <table name="pg_stat_statements" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT pg_stat_statements.userid,&#10;    pg_stat_statements.dbid,&#10;    pg_stat_statements.queryid,&#10;    pg_stat_statements.query,&#10;    pg_stat_statements.calls,&#10;    pg_stat_statements.total_time,&#10;    pg_stat_statements.min_time,&#10;    pg_stat_statements.max_time,&#10;    pg_stat_statements.mean_time,&#10;    pg_stat_statements.stddev_time,&#10;    pg_stat_statements.rows,&#10;    pg_stat_statements.shared_blks_hit,&#10;    pg_stat_statements.shared_blks_read,&#10;    pg_stat_statements.shared_blks_dirtied,&#10;    pg_stat_statements.shared_blks_written,&#10;    pg_stat_statements.local_blks_hit,&#10;    pg_stat_statements.local_blks_read,&#10;    pg_stat_statements.local_blks_dirtied,&#10;    pg_stat_statements.local_blks_written,&#10;    pg_stat_statements.temp_blks_read,&#10;    pg_stat_statements.temp_blks_written,&#10;    pg_stat_statements.blk_read_time,&#10;    pg_stat_statements.blk_write_time&#10;   FROM pg_stat_statements(true) pg_stat_statements(userid, dbid, queryid, query, calls, total_time, min_time, max_time, mean_time, stddev_time, rows, shared_blks_hit, shared_blks_read, shared_blks_dirtied, shared_blks_written, local_blks_hit, local_blks_read, local_blks_dirtied, local_blks_written, temp_blks_read, temp_blks_written, blk_read_time, blk_write_time);">
         <column autoUpdated="false" digits="0" id="0" name="userid" nullable="true" remarks="" size="10" type="oid"/>
         <column autoUpdated="false" digits="0" id="1" name="dbid" nullable="true" remarks="" size="10" type="oid"/>
         <column autoUpdated="false" digits="0" id="2" name="queryid" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="3" name="query" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="4" name="calls" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="17" id="5" name="total_time" nullable="true" remarks="" size="17" type="float8"/>
         <column autoUpdated="false" digits="17" id="6" name="min_time" nullable="true" remarks="" size="17" type="float8"/>
         <column autoUpdated="false" digits="17" id="7" name="max_time" nullable="true" remarks="" size="17" type="float8"/>
         <column autoUpdated="false" digits="17" id="8" name="mean_time" nullable="true" remarks="" size="17" type="float8"/>
         <column autoUpdated="false" digits="17" id="9" name="stddev_time" nullable="true" remarks="" size="17" type="float8"/>
         <column autoUpdated="false" digits="0" id="10" name="rows" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="11" name="shared_blks_hit" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="12" name="shared_blks_read" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="13" name="shared_blks_dirtied" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="14" name="shared_blks_written" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="15" name="local_blks_hit" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="16" name="local_blks_read" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="17" name="local_blks_dirtied" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="18" name="local_blks_written" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="19" name="temp_blks_read" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="20" name="temp_blks_written" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" digits="17" id="21" name="blk_read_time" nullable="true" remarks="" size="17" type="float8"/>
         <column autoUpdated="false" digits="17" id="22" name="blk_write_time" nullable="true" remarks="" size="17" type="float8"/>
      </table>
      <table name="pricelists" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Price list ID" size="10" type="int4">
            <child column="pricelist" foreignKey="fk_pricelists2accounts_pricelist" implied="false" onDeleteCascade="true" schema="public" table="pricelists2accounts"/>
            <child column="pricelist" foreignKey="fk_prices_pricelist" implied="false" onDeleteCascade="true" schema="public" table="prices"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_pricelists_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_pricelists_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="activity" nullable="false" remarks="Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="6" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="type" nullable="false" remarks="Price list type (`0`=BILLING_MIN, `1`=BILLING_MAX, `2`=PROCUREMENT_MIN, `3`=PROCUREMENT_MAX)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="8" name="currency" nullable="false" remarks="Currency code ([ISO 4217](http://en.wikipedia.org/wiki/ISO_4217)) (Pattern: `^[A-Z]{3}$`)" size="3" type="varchar"/>
         <column autoUpdated="false" digits="0" id="9" name="datefrom" nullable="true" remarks="Start date as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be less than or equal to `dateto`" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="10" name="dateto" nullable="true" remarks="End date as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp; must be greater than or equal to `datefrom`" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="applytoall" nullable="false" remarks="Apply to all accounts regardless of association via `pricelists2accounts`" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="12" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_pricelists" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_pricelists_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_pricelists_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="s_pricelists" unique="false">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="pricelists2accounts" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Pricelist-to-account ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_pricelists2accounts_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="3" name="pricelist" nullable="false" remarks="Price list ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_pricelists2accounts_pricelist" implied="false" onDeleteCascade="true" schema="public" table="pricelists"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="account" nullable="false" remarks="Account ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_pricelists2accounts_account" implied="false" onDeleteCascade="true" schema="public" table="accounts"/>
         </column>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_pricelists2accounts" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_pricelists2accounts_account" unique="false">
            <column ascending="true" name="account"/>
         </index>
         <index name="u_pricelists2accounts_pricelist_account" unique="true">
            <column ascending="true" name="pricelist"/>
            <column ascending="true" name="account"/>
         </index>
      </table>
      <table name="prices" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Price ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_prices_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="item" nullable="false" remarks="Item ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_prices_item" implied="false" onDeleteCascade="true" schema="public" table="items"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="pricelist" nullable="false" remarks="Price list ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_prices_pricelist" implied="false" onDeleteCascade="true" schema="public" table="pricelists"/>
         </column>
         <column autoUpdated="false" digits="17" id="6" name="price" nullable="true" remarks="Price per unit (`null`=`item.sellingprice` for billing or `null`=`item.purchaseprice` for procurement)" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="7" name="rebate" nullable="false" remarks="Absolute rebate per unit (applied before `discount`)" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="8" name="discount" nullable="false" remarks="Relative discount in percent (applied after `rebate`)" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="9" name="minamount" nullable="false" remarks="Minimum amount (quantity)" size="17" type="float8"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_prices" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_prices_item" unique="false">
            <column ascending="true" name="item"/>
         </index>
         <index name="fk_prices_pricelist" unique="false">
            <column ascending="true" name="pricelist"/>
         </index>
      </table>
      <table name="projects" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Project ID" size="10" type="int4">
            <child column="project" foreignKey="fk_tasks_project" implied="false" onDeleteCascade="false" schema="public" table="tasks"/>
            <child column="project" foreignKey="fk_tickets_project" implied="false" onDeleteCascade="false" schema="public" table="tickets"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_projects_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_projects_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_projects_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_projects_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="6" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="8" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="9" name="projectnum" nullable="false" remarks="Project number" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="status" nullable="false" remarks="Status (`0`=DRAFT, `1`=NOTSTARTED, `2`=AWAITINGAPPROVAL, `3`=APPROVED, `4`=DISMISSED, `5`=ACTIVE, `6`=INACTIVE, `7`=TESTING, `8`=CANCELLED, `9`=COMPLETED, `10`=FAILED, `11`=BOOKED)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_projects" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_projects_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_projects_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_projects" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="projectnum"/>
         </index>
      </table>
      <table name="recent" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="entity" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="1" name="index" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="2" name="user" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="3" name="date" nullable="false" remarks="" size="19" type="int8"/>
         <primaryKey column="user" sequenceNumberInPK="1"/>
         <primaryKey column="entity" sequenceNumberInPK="2"/>
         <primaryKey column="index" sequenceNumberInPK="3"/>
         <primaryKey column="date" sequenceNumberInPK="4"/>
         <index name="pk_recent" unique="true">
            <column ascending="true" name="user"/>
            <column ascending="true" name="entity"/>
            <column ascending="true" name="index"/>
            <column ascending="true" name="date"/>
         </index>
      </table>
      <table name="records" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Record ID" size="19" type="int8">
            <child column="record" foreignKey="fk_comments_record" implied="false" onDeleteCascade="true" schema="public" table="comments"/>
            <child column="record" foreignKey="fk_feedids_record" implied="false" onDeleteCascade="false" schema="public" table="feedids"/>
            <child column="record" foreignKey="fk_files_record" implied="false" onDeleteCascade="true" schema="public" table="files"/>
            <child column="record" foreignKey="fk_likes_record" implied="false" onDeleteCascade="true" schema="public" table="likes"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_records_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_records_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_records_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="assigneduser" nullable="true" remarks="Assigned user (recipient) ID; must be distinct from `creator`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_records_assigneduser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="6" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="7" name="entity" nullable="true" remarks="Canonical entity" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="8" name="index" nullable="true" remarks="Entity ID; is required if `entity` is not `null`, otherwise must be `null`" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="flag" nullable="false" remarks="Flag (`0`=REGULAR, `1`=ASSOCONLY, `2`=MINDLOGONLY, `3`=MONITOR); must be REGULAR if `entity` is `null`" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="10" name="date" nullable="false" remarks="Designated date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="11" name="stickydate" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="12" name="sender" nullable="false" remarks="Sender" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="13" name="text" nullable="false" remarks="Record text ([Markdown](http://en.wikipedia.org/wiki/Markdown) for rich text representation)" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="14" name="meta" nullable="true" remarks="" size="2147483647" type="json"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_records" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_records_date_ID" unique="false">
            <column ascending="false" name="date"/>
            <column ascending="false" name="ID"/>
         </index>
         <index name="i_records_entity_index" unique="false">
            <column ascending="true" name="entity"/>
            <column ascending="true" name="index"/>
         </index>
         <index name="i_records_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_records_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="creator"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="i_records_stickydate_ID" unique="false">
            <column ascending="false" name="stickydate"/>
            <column ascending="false" name="ID"/>
         </index>
         <index name="s_records" unique="false">
            <column ascending="true" name="sender"/>
            <column ascending="true" name="text"/>
         </index>
      </table>
      <table name="resources" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Resource ID" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_resources_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="application" nullable="true" remarks="Application ID (`null`=STANDALONE)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_resources_application" implied="false" onDeleteCascade="true" schema="public" table="applications"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="binfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="activity" nullable="false" remarks="Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="7" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="8" name="identifier" nullable="false" remarks="Unique resource identifier (Pattern: `^[a-zA-Z\d][\w.-]*$`)" size="200" type="varchar"/>
         <column autoUpdated="false" defaultValue="'text/x-zymba'::text" digits="0" id="9" name="mimetype" nullable="false" remarks="[MIME type](http://en.wikipedia.org/wiki/Media_type) ([RFC 2045](http://tools.ietf.org/html/rfc2045)) (Pattern: `^[a-z]+/[^ \t\v\r\n]+$`)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="public" nullable="false" remarks="Publicly accessible" size="5" type="int2"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_resources" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_resources_application" unique="false">
            <column ascending="true" name="application"/>
         </index>
         <index name="s_resources" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="identifier"/>
         </index>
         <index name="u_resources_identifier" unique="true">
            <column ascending="true" name="identifier"/>
         </index>
      </table>
      <table name="services" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Service ID" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_services_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="application" nullable="true" remarks="Application ID (`null`=STANDALONE)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_services_application" implied="false" onDeleteCascade="true" schema="public" table="applications"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="binfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="activity" nullable="false" remarks="Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="7" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="8" name="identifier" nullable="false" remarks="Unique service identifier (Pattern: `^[a-zA-Z\d][\w.-]*$`)" size="200" type="varchar"/>
         <column autoUpdated="false" digits="0" id="9" name="type" nullable="true" remarks="Service type (`0`=TIMING, `1`=REMOTECALL, `2`=AFTERCREATION, `3`=BEFOREMODIFICATION, `4`=AFTERMODIFICATION, `5`=AFTERCREATIONORMODIFICATION, `6`=BEFOREDELETION, `7`=AFTERDELETION)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="10" name="accesskey" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="entity" nullable="false" remarks="Canonical entity (only for AFTERCREATION, BEFOREMODIFICATION, AFTERMODIFICATION, AFTERCREATIONORMODIFICATION, BEFOREDELETION or AFTERDELETION)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="schedule" nullable="false" remarks="Schedule as a minute of each day (only for TIMING)" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="13" name="interval" nullable="false" remarks="Interval in minutes (only for TIMING)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="14" name="url" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="'text/x-zymba'::text" digits="0" id="15" name="mimetype" nullable="false" remarks="[MIME type](http://en.wikipedia.org/wiki/Media_type) ([RFC 2045](http://tools.ietf.org/html/rfc2045))" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_services" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_services_application" unique="false">
            <column ascending="true" name="application"/>
         </index>
         <index name="s_services" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="identifier"/>
         </index>
         <index name="u_services_identifier" unique="true">
            <column ascending="true" name="identifier"/>
         </index>
      </table>
      <table name="stocktransactions" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Stock transaction ID" size="19" type="int8">
            <child column="transfer" foreignKey="fk_stocktransactions_transfer" implied="false" onDeleteCascade="false" schema="public" table="stocktransactions"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_stocktransactions_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="item" nullable="false" remarks="Item ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_stocktransactions_item" implied="false" onDeleteCascade="true" schema="public" table="items"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="storage" nullable="true" remarks="Storage ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_stocktransactions_storage" implied="false" onDeleteCascade="false" schema="public" table="storages"/>
         </column>
         <column autoUpdated="false" digits="0" id="6" name="transaction" nullable="true" remarks="Transaction ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_stocktransactions_transaction" implied="false" onDeleteCascade="false" schema="public" table="transactions"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="transfer" nullable="true" remarks="Transfer stock transaction ID; must be distinct from `ID` and `null` for RESERVED" size="19" type="int8">
            <parent column="ID" foreignKey="fk_stocktransactions_transfer" implied="false" onDeleteCascade="false" schema="public" table="stocktransactions"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="flag" nullable="false" remarks="Flag (`0`=BOOKED, `1`=RESERVED, `2`=CANCELLED)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="9" name="date" nullable="false" remarks="Designated date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="10" name="chargenum" nullable="false" remarks="Charge (lot) number" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="location" nullable="false" remarks="Physical location (e.g. shelf identification)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="12" name="reference" nullable="false" remarks="Reference identification" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="17" id="13" name="amount" nullable="false" remarks="Amount (quantity); must not be zero (greater than zero if `transfer` is not `null`)" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="14" name="sellingprice" nullable="false" remarks="Selling price per unit" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="15" name="purchaseprice" nullable="false" remarks="Purchase price per unit" size="17" type="float8"/>
         <column autoUpdated="false" digits="0" id="16" name="serials" nullable="true" remarks="Serial numbers" size="2147483647" type="_text"/>
         <column autoUpdated="false" digits="0" id="17" name="subtransactions" nullable="true" remarks="Sub-transaction IDs" size="19" type="_int8"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_stocktransactions" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_stocktransactions_item" unique="false">
            <column ascending="true" name="item"/>
         </index>
         <index name="fk_stocktransactions_storage" unique="false">
            <column ascending="true" name="storage"/>
         </index>
         <index name="fk_stocktransactions_transaction" unique="false">
            <column ascending="true" name="transaction"/>
         </index>
         <index name="i_stocktransactions_date_ID" unique="false">
            <column ascending="false" name="date"/>
            <column ascending="false" name="ID"/>
         </index>
         <index name="i_stocktransactions_serials" unique="false">
            <column ascending="true" name="serials"/>
         </index>
         <index name="s_stocktransactions" unique="false">
            <column ascending="true" name="chargenum"/>
         </index>
         <index name="u_stocktransactions_transfer" unique="true">
            <column ascending="true" name="transfer"/>
         </index>
      </table>
      <table name="storages" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Storage ID" size="10" type="int4">
            <child column="storage" foreignKey="fk_stocktransactions_storage" implied="false" onDeleteCascade="false" schema="public" table="stocktransactions"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_storages_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_storages_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="6" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="7" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_storages" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="i_storages_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_storages_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="s_storages" unique="false">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="suppliers" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Supplier ID" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_suppliers_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="item" nullable="false" remarks="Item ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_suppliers_item" implied="false" onDeleteCascade="true" schema="public" table="items"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="account" nullable="false" remarks="Account ID (**dependency**)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_suppliers_account" implied="false" onDeleteCascade="true" schema="public" table="accounts"/>
         </column>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="6" name="itemnum" nullable="false" remarks="Supplier item number (SKU)" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="17" id="7" name="price" nullable="true" remarks="Supplier price per unit" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="8" name="minamount" nullable="false" remarks="Minimum order amount (quantity)" size="17" type="float8"/>
         <column autoUpdated="false" digits="0" id="9" name="deliverytime" nullable="true" remarks="Expected delivery time in days" size="5" type="int2"/>
         <column autoUpdated="false" digits="17" id="10" name="stock" nullable="true" remarks="Expected stock/inventory amount (quantity)" size="17" type="float8"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_suppliers" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_suppliers_account" unique="false">
            <column ascending="true" name="account"/>
         </index>
         <index name="s_suppliers" unique="false">
            <column ascending="true" name="itemnum"/>
         </index>
         <index name="u_suppliers_item_account" unique="true">
            <column ascending="true" name="item"/>
            <column ascending="true" name="account"/>
         </index>
      </table>
      <table name="tagnames" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="entity" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_tagnames" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="u_tagnames_entity_name" unique="true">
            <column ascending="true" name="entity"/>
            <column ascending="true" name="name"/>
            <column ascending="true" name="ID"/>
         </index>
      </table>
      <table name="tagrels" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="name" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="index" nullable="false" remarks="" size="19" type="int8"/>
         <primaryKey column="name" sequenceNumberInPK="1"/>
         <primaryKey column="index" sequenceNumberInPK="2"/>
         <index name="pk_tagrels" unique="true">
            <column ascending="true" name="name"/>
            <column ascending="true" name="index"/>
         </index>
      </table>
      <table name="tags" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT tagnames.entity,&#10;    tagnames.name,&#10;    tagrels.index&#10;   FROM (tagrels&#10;     JOIN tagnames ON ((tagnames.&quot;ID&quot; = tagrels.name)));">
         <column autoUpdated="false" digits="0" id="0" name="entity" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="2" name="index" nullable="true" remarks="" size="19" type="int8"/>
      </table>
      <table name="tasks" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Task ID" size="10" type="int4">
            <child column="task" foreignKey="fk_actionsteps_task" implied="false" onDeleteCascade="false" schema="public" table="actionsteps"/>
            <child column="task" foreignKey="fk_davids_task" implied="false" onDeleteCascade="false" schema="public" table="davids"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="owneruser" nullable="true" remarks="Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_tasks_owneruser" implied="false" onDeleteCascade="true" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="ownergroup" nullable="true" remarks="Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_tasks_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_tasks_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_tasks_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="6" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="7" name="ticket" nullable="true" remarks="Ticket ID; is mutually exclusive to `project`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_tasks_ticket" implied="false" onDeleteCascade="false" schema="public" table="tickets"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="project" nullable="true" remarks="Project ID; is mutually exclusive to `ticket`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_tasks_project" implied="false" onDeleteCascade="false" schema="public" table="projects"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="10" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="11" name="tasknum" nullable="false" remarks="Task number" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="12" name="datefrom" nullable="true" remarks="Start date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="13" name="duedate" nullable="true" remarks="Due date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="status" nullable="false" remarks="Status (`0`=NOTSTARTED, `1`=AWAITINGACCEPTANCE, `2`=ACCEPTED, `3`=REJECTED, `4`=ACTIVE, `5`=INACTIVE, `6`=FEEDBACKREQUIRED, `7`=TESTING, `8`=CANCELLED, `9`=COMPLETED, `10`=FAILED, `11`=BOOKED)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="2" digits="0" id="15" name="priority" nullable="false" remarks="Priority (`0`=LOWEST, `1`=LOW, `2`=MEDIUM, `3`=HIGH, `4`=HIGHEST)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="projectedeffort" nullable="false" remarks="Projected effort in minutes" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="17" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_tasks" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_tasks_project" unique="false">
            <column ascending="true" name="project"/>
         </index>
         <index name="fk_tasks_ticket" unique="false">
            <column ascending="true" name="ticket"/>
         </index>
         <index name="i_tasks_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_tasks_owner" unique="false">
            <column ascending="true" name="owneruser"/>
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_tasks" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="tasknum"/>
         </index>
      </table>
      <table name="tickets" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Ticket ID" size="10" type="int4">
            <child column="ticket" foreignKey="fk_actionsteps_ticket" implied="false" onDeleteCascade="false" schema="public" table="actionsteps"/>
            <child column="ticket" foreignKey="fk_messages_ticket" implied="false" onDeleteCascade="false" schema="public" table="messages"/>
            <child column="ticket" foreignKey="fk_tasks_ticket" implied="false" onDeleteCascade="false" schema="public" table="tasks"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_tickets_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_tickets_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_tickets_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="account" nullable="true" remarks="Account ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_tickets_account" implied="false" onDeleteCascade="false" schema="public" table="accounts"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="project" nullable="true" remarks="Project ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_tickets_project" implied="false" onDeleteCascade="false" schema="public" table="projects"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="visibility" nullable="false" remarks="Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="9" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="10" name="ticketnum" nullable="false" remarks="Ticket number" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="11" name="date" nullable="false" remarks="Designated date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="12" name="duedate" nullable="true" remarks="Due date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="status" nullable="false" remarks="Status (`0`=NOTSTARTED, `1`=AWAITINGACCEPTANCE, `2`=ACCEPTED, `3`=REJECTED, `4`=ACTIVE, `5`=INACTIVE, `6`=FEEDBACKREQUIRED, `7`=TESTING, `8`=CANCELLED, `9`=COMPLETED, `10`=FAILED, `11`=BOOKED)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="2" digits="0" id="14" name="priority" nullable="false" remarks="Priority (`0`=LOWEST, `1`=LOW, `2`=MEDIUM, `3`=HIGH, `4`=HIGHEST)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="15" name="description" nullable="false" remarks="Detailed general description" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="16" name="billingitems" nullable="true" remarks="" size="2147483647" type="json"/>
         <column autoUpdated="false" digits="0" id="17" name="procurementitems" nullable="true" remarks="" size="2147483647" type="json"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_tickets" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_tickets_account" unique="false">
            <column ascending="true" name="account"/>
         </index>
         <index name="fk_tickets_project" unique="false">
            <column ascending="true" name="project"/>
         </index>
         <index name="i_tickets_date_ID" unique="false">
            <column ascending="false" name="date"/>
            <column ascending="false" name="ID"/>
         </index>
         <index name="i_tickets_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_tickets_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="s_tickets" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="ticketnum"/>
         </index>
      </table>
      <table name="tokens" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="user" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="application" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="2" name="token" nullable="false" remarks="" size="40" type="varchar"/>
         <column autoUpdated="false" digits="0" id="3" name="identifier" nullable="false" remarks="" size="2147483647" type="text">
            <parent column="identifier" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" schema="public" table="numcounters"/>
         </column>
         <column autoUpdated="false" digits="0" id="4" name="expdate" nullable="true" remarks="" size="19" type="int8"/>
         <primaryKey column="token" sequenceNumberInPK="1"/>
         <index name="pk_tokens" unique="true">
            <column ascending="true" name="token"/>
         </index>
         <index name="u_tokens_user_identifier" unique="true">
            <column ascending="true" name="user"/>
            <column ascending="true" name="identifier"/>
         </index>
      </table>
      <table name="transactions" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Transaction ID" size="10" type="int4">
            <child column="transaction" foreignKey="fk_actionsteps_transaction" implied="false" onDeleteCascade="false" schema="public" table="actionsteps"/>
            <child column="transaction" foreignKey="fk_couponcodes_transaction" implied="false" onDeleteCascade="false" schema="public" table="couponcodes"/>
            <child column="transaction" foreignKey="fk_dunning2transactions_transaction" implied="false" onDeleteCascade="true" schema="public" table="dunning2transactions"/>
            <child column="transaction" foreignKey="fk_payments_transaction" implied="false" onDeleteCascade="false" schema="public" table="payments"/>
            <child column="transaction" foreignKey="fk_stocktransactions_transaction" implied="false" onDeleteCascade="false" schema="public" table="stocktransactions"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="ownergroup" nullable="true" remarks="Owner group ID (`null`=PUBLIC)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_transactions_ownergroup" implied="false" onDeleteCascade="true" schema="public" table="groups"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_transactions_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="assigneduser" nullable="true" remarks="Assigned user ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_transactions_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="4" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="5" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="6" name="account" nullable="true" remarks="Account ID; must be `null` for PRODUCTION" size="10" type="int4">
            <parent column="ID" foreignKey="fk_transactions_account" implied="false" onDeleteCascade="false" schema="public" table="accounts"/>
         </column>
         <column autoUpdated="false" digits="0" id="7" name="item" nullable="true" remarks="Item ID; is required for PRODUCTION, otherwise must be `null`" size="10" type="int4">
            <parent column="ID" foreignKey="fk_transactions_item" implied="false" onDeleteCascade="true" schema="public" table="items"/>
         </column>
         <column autoUpdated="false" digits="0" id="8" name="transactionnum" nullable="false" remarks="Transaction number" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="type" nullable="false" remarks="Transaction type (`0`=BILLING_QUOTE, `1`=BILLING_ORDER, `2`=BILLING_DELIVERY, `3`=BILLING_INVOICE, `4`=BILLING_CREDIT, `5`=PROCUREMENT_REQUEST, `6`=PROCUREMENT_ORDER, `7`=PROCUREMENT_DELIVERY, `8`=PROCUREMENT_INVOICE, `9`=PROCUREMENT_CREDIT, `10`=PRODUCTION_FABRICATION, `11`=PRODUCTION_DISASSEMBLY)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="10" name="date" nullable="false" remarks="Designated date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="11" name="duedate" nullable="true" remarks="Due date as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="status" nullable="false" remarks="Status (`0`=DRAFT, `1`=BOOKED, `2`=HOLD, `3`=CANCELLED, `4`=CLOSED, `5`=PARTLYORDERED, `6`=PARTLYORDERED_CANCELLED, `7`=PARTLYORDERED_CLOSED, `8`=ORDERED, `9`=PARTLYDELIVERED, `10`=PARTLYDELIVERED_CANCELLED, `11`=PARTLYDELIVERED_CLOSED, `12`=DELIVERED, `13`=PARTLYINVOICED, `14`=PARTLYINVOICED_CANCELLED, `15`=PARTLYINVOICED_CLOSED, `16`=INVOICED, `17`=PARTLYPAID, `18`=PARTLYPAID_CANCELLED, `19`=PARTLYPAID_CLOSED, `20`=PAID, `21`=OVERPAID, `22`=PROCESSED, `23`=PROCESSED_CANCELLED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="13" name="productionfactor" nullable="true" remarks="Production factor; is required for PRODUCTION, otherwise must be `null`" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="14" name="currency" nullable="false" remarks="Currency code ([ISO 4217](http://en.wikipedia.org/wiki/ISO_4217)) (Pattern: `^[A-Z]{3}$`)" size="3" type="varchar"/>
         <column autoUpdated="false" defaultValue="1" digits="17" id="15" name="exchangerate" nullable="false" remarks="Exchange rate as a multiple of one monetary unit of the fixed system currency" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="16" name="shippingrecipient" nullable="false" remarks="Shipping recipient" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="17" name="shippingaddress" nullable="false" remarks="Shipping address (street and building/suite number)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="18" name="shippingpostalcode" nullable="false" remarks="Shipping postal or ZIP code" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="19" name="shippingcity" nullable="false" remarks="Shipping city or municipality" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="20" name="shippingregion" nullable="false" remarks="Shipping region or state" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::character varying" digits="0" id="21" name="shippingcountry" nullable="false" remarks="Shipping country code ([ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) (Pattern: `^([A-Z]{2})?$`)" size="2" type="varchar"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="22" name="billingrecipient" nullable="false" remarks="Billing recipient" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="23" name="billingaddress" nullable="false" remarks="Billing address (street and building/suite number)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="24" name="billingpostalcode" nullable="false" remarks="Billing postal or ZIP code" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="25" name="billingcity" nullable="false" remarks="Billing city or municipality" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="26" name="billingregion" nullable="false" remarks="Billing region or state" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::character varying" digits="0" id="27" name="billingcountry" nullable="false" remarks="Billing country code ([ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) (Pattern: `^([A-Z]{2})?$`)" size="2" type="varchar"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="28" name="discount" nullable="false" remarks="Total absolute discount" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="29" name="netamount" nullable="false" remarks="Total net amount" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="30" name="tax" nullable="false" remarks="Total tax amount" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="31" name="margin" nullable="false" remarks="Total absolute margin" size="17" type="float8"/>
         <column autoUpdated="false" defaultValue="0" digits="17" id="32" name="weight" nullable="false" remarks="Total shipping weight in kilogram" size="17" type="float8"/>
         <column autoUpdated="false" digits="0" id="33" name="items" nullable="true" remarks="" size="2147483647" type="json"/>
         <column autoUpdated="false" digits="0" id="34" name="contract" nullable="true" remarks="Contract ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_transactions_contract" implied="false" onDeleteCascade="false" schema="public" table="contracts"/>
         </column>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_transactions" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_transactions_account" unique="false">
            <column ascending="true" name="account"/>
         </index>
         <index name="fk_transactions_contract" unique="false">
            <column ascending="true" name="contract"/>
         </index>
         <index name="fk_transactions_item" unique="false">
            <column ascending="true" name="item"/>
         </index>
         <index name="i_transactions_date_ID" unique="false">
            <column ascending="false" name="date"/>
            <column ascending="false" name="ID"/>
         </index>
         <index name="i_transactions_noowner" unique="false">
            <column ascending="true" name="ownergroup"/>
         </index>
         <index name="i_transactions_owner" unique="false">
            <column ascending="true" name="ownergroup"/>
            <column ascending="true" name="assigneduser"/>
         </index>
         <index name="i_transactions_transactionnum_ID" unique="false">
            <column ascending="false" name="transactionnum"/>
            <column ascending="false" name="ID"/>
         </index>
         <index name="i_transactions_type" unique="false">
            <column ascending="true" name="type"/>
         </index>
         <index name="s_transactions" unique="false">
            <column ascending="true" name="transactionnum"/>
         </index>
         <index name="u_transactions_transactionnum_type" unique="true">
            <column ascending="true" name="transactionnum"/>
            <column ascending="true" name="type"/>
         </index>
      </table>
      <table name="users" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="User ID" size="10" type="int4">
            <child column="assigneduser" foreignKey="fk_accounts_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="accounts"/>
            <child column="creator" foreignKey="fk_accounts_creator" implied="false" onDeleteCascade="false" schema="public" table="accounts"/>
            <child column="assigneduser" foreignKey="fk_actionsteps_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="actionsteps"/>
            <child column="creator" foreignKey="fk_actionsteps_creator" implied="false" onDeleteCascade="false" schema="public" table="actionsteps"/>
            <child column="owneruser" foreignKey="fk_actionsteps_owneruser" implied="false" onDeleteCascade="true" schema="public" table="actionsteps"/>
            <child column="creator" foreignKey="fk_addresses_creator" implied="false" onDeleteCascade="false" schema="public" table="addresses"/>
            <child column="creator" foreignKey="fk_applications_creator" implied="false" onDeleteCascade="false" schema="public" table="applications"/>
            <child column="assigneduser" foreignKey="fk_appointments_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="appointments"/>
            <child column="creator" foreignKey="fk_appointments_creator" implied="false" onDeleteCascade="false" schema="public" table="appointments"/>
            <child column="owneruser" foreignKey="fk_appointments_owneruser" implied="false" onDeleteCascade="true" schema="public" table="appointments"/>
            <child column="assigneduser" foreignKey="fk_campaigns_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="campaigns"/>
            <child column="creator" foreignKey="fk_campaigns_creator" implied="false" onDeleteCascade="false" schema="public" table="campaigns"/>
            <child column="creator" foreignKey="fk_categories_creator" implied="false" onDeleteCascade="false" schema="public" table="categories"/>
            <child column="owneruser" foreignKey="fk_categories_owneruser" implied="false" onDeleteCascade="true" schema="public" table="categories"/>
            <child column="creator" foreignKey="fk_comments_creator" implied="false" onDeleteCascade="false" schema="public" table="comments"/>
            <child column="creator" foreignKey="fk_components_creator" implied="false" onDeleteCascade="false" schema="public" table="components"/>
            <child column="assigneduser" foreignKey="fk_contacts_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="contacts"/>
            <child column="creator" foreignKey="fk_contacts_creator" implied="false" onDeleteCascade="false" schema="public" table="contacts"/>
            <child column="owneruser" foreignKey="fk_contacts_owneruser" implied="false" onDeleteCascade="true" schema="public" table="contacts"/>
            <child column="creator" foreignKey="fk_contacts2contacts_creator" implied="false" onDeleteCascade="false" schema="public" table="contacts2contacts"/>
            <child column="assigneduser" foreignKey="fk_contracts_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="contracts"/>
            <child column="creator" foreignKey="fk_contracts_creator" implied="false" onDeleteCascade="false" schema="public" table="contracts"/>
            <child column="creator" foreignKey="fk_couponcodes_creator" implied="false" onDeleteCascade="false" schema="public" table="couponcodes"/>
            <child column="creator" foreignKey="fk_coupons_creator" implied="false" onDeleteCascade="false" schema="public" table="coupons"/>
            <child column="creator" foreignKey="fk_davservers_creator" implied="false" onDeleteCascade="false" schema="public" table="davservers"/>
            <child column="owneruser" foreignKey="fk_davservers_owneruser" implied="false" onDeleteCascade="true" schema="public" table="davservers"/>
            <child column="recipientuser" foreignKey="fk_davservers_recipientuser" implied="false" onDeleteCascade="false" schema="public" table="davservers"/>
            <child column="assigneduser" foreignKey="fk_dunning_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="dunning"/>
            <child column="creator" foreignKey="fk_dunning_creator" implied="false" onDeleteCascade="false" schema="public" table="dunning"/>
            <child column="creator" foreignKey="fk_dunning2transactions_creator" implied="false" onDeleteCascade="false" schema="public" table="dunning2transactions"/>
            <child column="creator" foreignKey="fk_events_creator" implied="false" onDeleteCascade="false" schema="public" table="events"/>
            <child column="owneruser" foreignKey="fk_events_owneruser" implied="false" onDeleteCascade="true" schema="public" table="events"/>
            <child column="creator" foreignKey="fk_feedservers_creator" implied="false" onDeleteCascade="false" schema="public" table="feedservers"/>
            <child column="owneruser" foreignKey="fk_feedservers_owneruser" implied="false" onDeleteCascade="true" schema="public" table="feedservers"/>
            <child column="recipientuser" foreignKey="fk_feedservers_recipientuser" implied="false" onDeleteCascade="false" schema="public" table="feedservers"/>
            <child column="creator" foreignKey="fk_files_creator" implied="false" onDeleteCascade="false" schema="public" table="files"/>
            <child column="creator" foreignKey="fk_follows_creator" implied="false" onDeleteCascade="true" schema="public" table="follows"/>
            <child column="creator" foreignKey="fk_groups_creator" implied="false" onDeleteCascade="false" schema="public" table="groups"/>
            <child column="leader" foreignKey="fk_groups_leader" implied="false" onDeleteCascade="false" schema="public" table="groups"/>
            <child column="creator" foreignKey="fk_groups2users_creator" implied="false" onDeleteCascade="false" schema="public" table="groups2users"/>
            <child column="user" foreignKey="fk_groups2users_user" implied="false" onDeleteCascade="true" schema="public" table="groups2users"/>
            <child column="creator" foreignKey="fk_invitations_creator" implied="false" onDeleteCascade="false" schema="public" table="invitations"/>
            <child column="creator" foreignKey="fk_items_creator" implied="false" onDeleteCascade="false" schema="public" table="items"/>
            <child column="creator" foreignKey="fk_ledgers_creator" implied="false" onDeleteCascade="false" schema="public" table="ledgers"/>
            <child column="creator" foreignKey="fk_likes_creator" implied="false" onDeleteCascade="true" schema="public" table="likes"/>
            <child column="assigneduser" foreignKey="fk_links_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="links"/>
            <child column="creator" foreignKey="fk_links_creator" implied="false" onDeleteCascade="false" schema="public" table="links"/>
            <child column="owneruser" foreignKey="fk_links_owneruser" implied="false" onDeleteCascade="true" schema="public" table="links"/>
            <child column="assigneduser" foreignKey="fk_mailinglists_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="mailinglists"/>
            <child column="creator" foreignKey="fk_mailinglists_creator" implied="false" onDeleteCascade="false" schema="public" table="mailinglists"/>
            <child column="owneruser" foreignKey="fk_mailinglists_owneruser" implied="false" onDeleteCascade="true" schema="public" table="mailinglists"/>
            <child column="creator" foreignKey="fk_mailservers_creator" implied="false" onDeleteCascade="false" schema="public" table="mailservers"/>
            <child column="owneruser" foreignKey="fk_mailservers_owneruser" implied="false" onDeleteCascade="true" schema="public" table="mailservers"/>
            <child column="recipientuser" foreignKey="fk_mailservers_recipientuser" implied="false" onDeleteCascade="false" schema="public" table="mailservers"/>
            <child column="creator" foreignKey="fk_messagereads_creator" implied="false" onDeleteCascade="true" schema="public" table="messagereads"/>
            <child column="creator" foreignKey="fk_messages_creator" implied="false" onDeleteCascade="false" schema="public" table="messages"/>
            <child column="owneruser" foreignKey="fk_messages_owneruser" implied="false" onDeleteCascade="true" schema="public" table="messages"/>
            <child column="assigneduser" foreignKey="fk_notes_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="notes"/>
            <child column="creator" foreignKey="fk_notes_creator" implied="false" onDeleteCascade="false" schema="public" table="notes"/>
            <child column="owneruser" foreignKey="fk_notes_owneruser" implied="false" onDeleteCascade="true" schema="public" table="notes"/>
            <child column="assigneduser" foreignKey="fk_objects_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="objects"/>
            <child column="creator" foreignKey="fk_objects_creator" implied="false" onDeleteCascade="false" schema="public" table="objects"/>
            <child column="owneruser" foreignKey="fk_objects_owneruser" implied="false" onDeleteCascade="true" schema="public" table="objects"/>
            <child column="assigneduser" foreignKey="fk_opportunities_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="opportunities"/>
            <child column="creator" foreignKey="fk_opportunities_creator" implied="false" onDeleteCascade="false" schema="public" table="opportunities"/>
            <child column="creator" foreignKey="fk_participants_creator" implied="false" onDeleteCascade="false" schema="public" table="participants"/>
            <child column="assigneduser" foreignKey="fk_payments_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="payments"/>
            <child column="creator" foreignKey="fk_payments_creator" implied="false" onDeleteCascade="false" schema="public" table="payments"/>
            <child column="creator" foreignKey="fk_permissions_creator" implied="false" onDeleteCascade="false" schema="public" table="permissions"/>
            <child column="creator" foreignKey="fk_pricelists_creator" implied="false" onDeleteCascade="false" schema="public" table="pricelists"/>
            <child column="creator" foreignKey="fk_pricelists2accounts_creator" implied="false" onDeleteCascade="false" schema="public" table="pricelists2accounts"/>
            <child column="creator" foreignKey="fk_prices_creator" implied="false" onDeleteCascade="false" schema="public" table="prices"/>
            <child column="assigneduser" foreignKey="fk_projects_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="projects"/>
            <child column="creator" foreignKey="fk_projects_creator" implied="false" onDeleteCascade="false" schema="public" table="projects"/>
            <child column="owneruser" foreignKey="fk_projects_owneruser" implied="false" onDeleteCascade="true" schema="public" table="projects"/>
            <child column="assigneduser" foreignKey="fk_records_assigneduser" implied="false" onDeleteCascade="true" schema="public" table="records"/>
            <child column="creator" foreignKey="fk_records_creator" implied="false" onDeleteCascade="false" schema="public" table="records"/>
            <child column="owneruser" foreignKey="fk_records_owneruser" implied="false" onDeleteCascade="true" schema="public" table="records"/>
            <child column="creator" foreignKey="fk_resources_creator" implied="false" onDeleteCascade="false" schema="public" table="resources"/>
            <child column="creator" foreignKey="fk_services_creator" implied="false" onDeleteCascade="false" schema="public" table="services"/>
            <child column="creator" foreignKey="fk_stocktransactions_creator" implied="false" onDeleteCascade="false" schema="public" table="stocktransactions"/>
            <child column="creator" foreignKey="fk_storages_creator" implied="false" onDeleteCascade="false" schema="public" table="storages"/>
            <child column="creator" foreignKey="fk_suppliers_creator" implied="false" onDeleteCascade="false" schema="public" table="suppliers"/>
            <child column="assigneduser" foreignKey="fk_tasks_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="tasks"/>
            <child column="creator" foreignKey="fk_tasks_creator" implied="false" onDeleteCascade="false" schema="public" table="tasks"/>
            <child column="owneruser" foreignKey="fk_tasks_owneruser" implied="false" onDeleteCascade="true" schema="public" table="tasks"/>
            <child column="assigneduser" foreignKey="fk_tickets_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="tickets"/>
            <child column="creator" foreignKey="fk_tickets_creator" implied="false" onDeleteCascade="false" schema="public" table="tickets"/>
            <child column="assigneduser" foreignKey="fk_transactions_assigneduser" implied="false" onDeleteCascade="false" schema="public" table="transactions"/>
            <child column="creator" foreignKey="fk_transactions_creator" implied="false" onDeleteCascade="false" schema="public" table="transactions"/>
            <child column="creator" foreignKey="fk_users_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
            <child column="creator" foreignKey="fk_weblets_creator" implied="false" onDeleteCascade="false" schema="public" table="weblets"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_users_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="contact" nullable="true" remarks="Contact ID" size="10" type="int4">
            <parent column="ID" foreignKey="fk_users_contact" implied="false" onDeleteCascade="false" schema="public" table="contacts"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="activity" nullable="false" remarks="Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="6" name="name" nullable="false" remarks="Username (case-insensitively unique)" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="7" name="email" nullable="false" remarks="System e-mail address (case-insensitively unique)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="8" name="password" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="9" name="otpsecret" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="nopublic" nullable="false" remarks="Deny access to public data" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="11" name="expdate" nullable="true" remarks="Expiry date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="12" name="lastlogin" nullable="true" remarks="Last login date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="13" name="lastloginattempt" nullable="true" remarks="" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="loginattempts" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="''::character varying" digits="0" id="15" name="resetlogintoken" nullable="false" remarks="" size="40" type="varchar"/>
         <column autoUpdated="false" defaultValue="''::character varying" digits="0" id="16" name="persistentlogintoken" nullable="false" remarks="" size="40" type="varchar"/>
         <column autoUpdated="false" defaultValue="''::character varying" digits="0" id="17" name="sessionid" nullable="false" remarks="" size="40" type="varchar"/>
         <column autoUpdated="false" digits="0" id="18" name="signature" nullable="false" remarks="" size="32" type="varchar"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="19" name="description" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="20" name="settings" nullable="true" remarks="" size="2147483647" type="json"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_users" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_users_contact" unique="false">
            <column ascending="true" name="contact"/>
         </index>
         <index name="s_users" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="email"/>
         </index>
         <index name="u_users_email" unique="true"/>
         <index name="u_users_name" unique="true"/>
         <index name="u_users_persistentlogintoken" unique="true">
            <column ascending="true" name="persistentlogintoken"/>
         </index>
      </table>
      <table name="views" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="user" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="view" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="2" name="data" nullable="false" remarks="" size="2147483647" type="text"/>
         <primaryKey column="user" sequenceNumberInPK="1"/>
         <primaryKey column="view" sequenceNumberInPK="2"/>
         <index name="pk_views" unique="true">
            <column ascending="true" name="user"/>
            <column ascending="true" name="view"/>
         </index>
      </table>
      <table name="weblets" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" digits="0" id="0" name="ID" nullable="false" remarks="Weblet ID" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="creator" nullable="true" remarks="Creator user ID (defaults to authenticated user on creation)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_weblets_creator" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="2" name="creationdate" nullable="false" remarks="Creation date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (defaults to current date and time on creation)" size="19" type="int8"/>
         <column autoUpdated="false" defaultValue="date_part('epoch'::text, now())" digits="0" id="3" name="lastmodified" nullable="false" remarks="Last modification date and time as a [Unix time](http://en.wikipedia.org/wiki/Unix_time) stamp (auto-reset on modification)" size="19" type="int8"/>
         <column autoUpdated="false" digits="0" id="4" name="application" nullable="true" remarks="Application ID (`null`=STANDALONE)" size="10" type="int4">
            <parent column="ID" foreignKey="fk_weblets_application" implied="false" onDeleteCascade="true" schema="public" table="applications"/>
         </column>
         <column autoUpdated="false" digits="0" id="5" name="binfile" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="activity" nullable="false" remarks="Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED)" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="7" name="name" nullable="false" remarks="Name" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="8" name="identifier" nullable="false" remarks="Unique weblet identifier (Pattern: `^[a-zA-Z\d][\w.-]*$`)" size="200" type="varchar"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="9" name="view" nullable="false" remarks="Canonical view" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="type" nullable="false" remarks="Weblet type (`0`=INTEGRATED, `1`=STANDALONE, `2`=DETACHED, `3`=POPUP_FRAMED, `4`=POPUP_PLAIN, `5`=EMBEDDED_FRAMED, `6`=EMBEDDED_COLLAPSED, `7`=EMBEDDED_PLAIN)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="width" nullable="false" remarks="Width in pixels (`0`=100%)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="height" nullable="false" remarks="Height in pixels (`0`=100%)" size="5" type="int2"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="13" name="url" nullable="false" remarks="" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::text" digits="0" id="14" name="svgpath" nullable="false" remarks="[SVG path](http://www.w3.org/TR/SVG11/paths.html) for icon (square)" size="2147483647" type="text"/>
         <column autoUpdated="false" defaultValue="''::character varying" digits="0" id="15" name="color" nullable="false" remarks="Color code (CSS-style hexadecimal without `#`) (Pattern: `^([A-F\d]{3}){0,2}$`)" size="6" type="varchar"/>
         <column autoUpdated="false" defaultValue="'text/x-zymba'::text" digits="0" id="16" name="mimetype" nullable="false" remarks="[MIME type](http://en.wikipedia.org/wiki/Media_type) ([RFC 2045](http://tools.ietf.org/html/rfc2045))" size="2147483647" type="text"/>
         <column autoUpdated="false" digits="0" id="17" name="langaliases" nullable="true" remarks="Language-specific aliases; use language code as object key" size="2147483647" type="json"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="pk_weblets" unique="true">
            <column ascending="true" name="ID"/>
         </index>
         <index name="fk_weblets_application" unique="false">
            <column ascending="true" name="application"/>
         </index>
         <index name="s_weblets" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="identifier"/>
         </index>
         <index name="u_weblets_identifier" unique="true">
            <column ascending="true" name="identifier"/>
         </index>
      </table>
   </tables>
</database>
