<?xml version="1.0" encoding="UTF-8"?><database name="ptms2" schema="public" type="PostgreSQL - 12.15 (Ubuntu 12.15-1.pgdg18.04+1)">
   <sequences>
      <sequence increment="1" name="absence_id_seq" startValue="1"/>
      <sequence increment="1" name="absencetype_id_seq" startValue="1"/>
      <sequence increment="1" name="approvaltype_id_seq" startValue="1"/>
      <sequence increment="1" name="car_id_seq" startValue="1"/>
      <sequence increment="1" name="car_registration_id_seq" startValue="1"/>
      <sequence increment="1" name="carmodel_id_seq" startValue="1"/>
      <sequence increment="1" name="jobtitle_id_seq" startValue="1"/>
      <sequence increment="1" name="locale_id_seq" startValue="1"/>
      <sequence increment="1" name="manufacturer_id_seq" startValue="1"/>
      <sequence increment="1" name="mileage_id_seq" startValue="1"/>
      <sequence increment="1" name="mileagetype_id_seq" startValue="1"/>
      <sequence increment="1" name="staff_contract_id_seq" startValue="1"/>
      <sequence increment="1" name="staff_id_seq" startValue="1"/>
      <sequence increment="1" name="trip_id_seq" startValue="1"/>
      <sequence increment="1" name="trip_user_id_seq" startValue="1"/>
      <sequence increment="1" name="tripusertype_id_seq" startValue="1"/>
   </sequences>
   <tables>
      <table name="_car" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT car.id,&#10;    car.created_at,&#10;    car.updated_at,&#10;    car.id_creator,&#10;    car.id_updater,&#10;    car.id_carmodel,&#10;    car.chassisnumber,&#10;    car.wheelchairseat,&#10;    car.seat,&#10;    car.note,&#10;    car.id_tenant,&#10;    ( SELECT car_registration.numberplate&#10;           FROM car_registration&#10;          WHERE ((car_registration.id_car = car.id) AND (car_registration.valid_from &lt;= CURRENT_TIMESTAMP) AND ((car_registration.valid_to IS NULL) OR (car_registration.valid_to &gt;= CURRENT_TIMESTAMP)))&#10;          ORDER BY car_registration.valid_from DESC&#10;         LIMIT 1) AS numberplate,&#10;    m.mileage_km,&#10;    m.mileage_recorded_at&#10;   FROM (car&#10;     LEFT JOIN LATERAL ( SELECT mileage.km AS mileage_km,&#10;            mileage.recorded_at AS mileage_recorded_at&#10;           FROM mileage&#10;          WHERE (mileage.id_car = car.id)&#10;          ORDER BY mileage.recorded_at DESC&#10;         LIMIT 1) m ON (true));">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="1" name="created_at" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="2" name="updated_at" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="id_creator" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="id_updater" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="id_carmodel" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="chassisnumber" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="wheelchairseat" nullable="true" remarks="" size="5" type="int2" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="seat" nullable="true" remarks="" size="5" type="int2" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="note" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="id_tenant" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="numberplate" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="mileage_km" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="13" name="mileage_recorded_at" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
      </table>
      <table name="_trip" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT trip.id,&#10;    trip.created_at,&#10;    trip.updated_at,&#10;    trip.id_creator,&#10;    trip.id_updater,&#10;    trip.id_car,&#10;    trip.started_at,&#10;    trip.stopped_at,&#10;    trip.km_start,&#10;    trip.km_stop,&#10;    trip.note,&#10;    trip.latitude_start,&#10;    trip.longitude_start,&#10;    trip.latitude_stop,&#10;    trip.longitude_stop,&#10;    trip.id_tenant,&#10;    ( SELECT trip_user.id_user&#10;           FROM trip_user&#10;          WHERE ((trip_user.id_trip = trip.id) AND (trip_user.id_tripusertype = 1))) AS id_driver&#10;   FROM trip;">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="1" name="created_at" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="2" name="updated_at" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="id_creator" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="id_updater" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="id_car" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="6" name="started_at" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="stopped_at" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="km_start" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="km_stop" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="note" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="11" name="latitude_start" nullable="true" remarks="" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="12" name="longitude_start" nullable="true" remarks="" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="13" name="latitude_stop" nullable="true" remarks="" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="14" name="longitude_stop" nullable="true" remarks="" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="id_tenant" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="id_driver" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
      </table>
      <table name="absence" numRows="0" remarks="Holds all absence records" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('absence_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="19" type="bigserial" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="1" name="id_tenant" nullable="false" remarks="Reference to the tenant" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="2" name="created_at" nullable="false" remarks="Timestamp of creation" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="3" name="updated_at" nullable="false" remarks="Timestamp of last update" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="id_creator" nullable="false" remarks="Reference to the creator" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_absence_id_creator" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="id_updater" nullable="false" remarks="Reference to the last updater" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_absence_id_updater" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="id_user" nullable="false" remarks="Reference to the user this absence belongs to" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_absence_id_user" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="id_absencetype" nullable="false" remarks="Reference to the absence type" size="5" type="int2" typeCode="5">
            <parent column="id" foreignKey="fk_absence_id_absencetype" implied="false" onDeleteCascade="false" schema="public" table="absencetype"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="8" name="id_approvaltype" nullable="false" remarks="Reference to the approval type" size="5" type="int2" typeCode="5">
            <parent column="id" foreignKey="fk_absence_id_approvaltype" implied="false" onDeleteCascade="false" schema="public" table="approvaltype"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="9" name="started_at" nullable="false" remarks="Timestamp when the absence started" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="10" name="stopped_at" nullable="true" remarks="Timestamp when the absence stopped" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="note_request" nullable="false" remarks="The note of the person who requested the absence (normally the employee like driver, assistant, etc.)" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="note_response" nullable="true" remarks="The note of the person who approved the absence (normally the personnel employee)" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_absence_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <checkConstraint constraint="((started_at &lt; stopped_at))" name="c_absence_stopped_after_started"/>
      </table>
      <table name="absencetype" numRows="0" remarks="Holds all absence types" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('absencetype_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="5" type="int2" typeCode="5">
            <child column="id_absencetype" foreignKey="fk_absence_id_absencetype" implied="false" onDeleteCascade="false" schema="public" table="absence"/>
         </column>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="1" name="created_at" nullable="false" remarks="Timestamp of creation" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="2" name="updated_at" nullable="false" remarks="Timestamp of last update" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="id_creator" nullable="false" remarks="Reference to the creator" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_absencetype_id_creator" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="id_updater" nullable="false" remarks="Reference to the last updater" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_absencetype_id_updater" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="code" nullable="false" remarks="Unique code of the absence type" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="name" nullable="false" remarks="The name of the absence type" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="7" name="time_01" nullable="false" remarks="TRUE means a time part is needed" size="1" type="bool" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="8" name="approval_01" nullable="false" remarks="TRUE means an approval process is needed" size="1" type="bool" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="note" nullable="true" remarks="A note for absence type" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_absencetype_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="u_absencetype_code" unique="true">
            <column ascending="true" name="code"/>
         </index>
      </table>
      <table name="approvaltype" numRows="0" remarks="Holds all approval types" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('approvaltype_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="5" type="int2" typeCode="5">
            <child column="id_approvaltype" foreignKey="fk_absence_id_approvaltype" implied="false" onDeleteCascade="false" schema="public" table="absence"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="code" nullable="false" remarks="Unique code of the approval type" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="position" nullable="false" remarks="Unique position of the approval type" size="5" type="int2" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="name" nullable="false" remarks="The name of the approval type" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_approvaltype_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="u_approvaltype_code" unique="true">
            <column ascending="true" name="code"/>
         </index>
         <index name="u_approvaltype_position" unique="true">
            <column ascending="true" name="position"/>
         </index>
      </table>
      <table name="car" numRows="0" remarks="Holds all cars" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('car_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="serial" typeCode="4">
            <child column="id_car" foreignKey="fk_car_registration_id_car" implied="false" onDeleteCascade="false" schema="public" table="car_registration"/>
            <child column="id_car" foreignKey="fk_mileage_id_car" implied="false" onDeleteCascade="false" schema="public" table="mileage"/>
            <child column="id_car" foreignKey="fk_trip_id_car" implied="false" onDeleteCascade="false" schema="public" table="trip"/>
         </column>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="1" name="created_at" nullable="false" remarks="" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="2" name="updated_at" nullable="false" remarks="" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="id_creator" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_car_id_creator" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="id_updater" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_car_id_updater" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="id_carmodel" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_car_id_carmodel" implied="false" onDeleteCascade="false" schema="public" table="carmodel"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="chassisnumber" nullable="true" remarks="Holds the unique chassis number" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="wheelchairseat" nullable="true" remarks="" size="5" type="int2" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="seat" nullable="true" remarks="" size="5" type="int2" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="note" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="id_tenant" nullable="false" remarks="Reference to the tenant" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_car_id_tenant" implied="false" onDeleteCascade="false" schema="access" table="tenant"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_car_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="u_car_chassisnumber" unique="true">
            <column ascending="true" name="chassisnumber"/>
         </index>
      </table>
      <table name="car_registration" numRows="21" remarks="Holds all registrations of a car" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('car_registration_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="10" type="serial" typeCode="4"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="1" name="id_tenant" nullable="false" remarks="Reference to the tenant" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_car_registration_id_tenant" implied="false" onDeleteCascade="false" schema="access" table="tenant"/>
         </column>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="2" name="created_at" nullable="false" remarks="Timestamp of creation" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="3" name="updated_at" nullable="false" remarks="Timestamp of last update" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="id_creator" nullable="false" remarks="Reference to the creator" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_car_registration_id_creator" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="id_updater" nullable="false" remarks="Reference to the last updater" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_car_registration_id_updater" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="id_car" nullable="false" remarks="Reference to the car" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_car_registration_id_car" implied="false" onDeleteCascade="false" schema="public" table="car"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="valid_from" nullable="false" remarks="Timestamp when the registration is valid from" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="8" name="valid_to" nullable="true" remarks="Timestamp until the registration is valid to" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="numberplate" nullable="false" remarks="The assigned numberplate in the periode (valid_from to valid_to)" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="note" nullable="true" remarks="A note for this car registration" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_car_registration_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="no_overlap_car_registration" unique="false">
            <column ascending="true" name="id_car"/>
         </index>
         <index name="u_car_registration_id_car_valid_from" unique="true">
            <column ascending="true" name="id_car"/>
            <column ascending="true" name="valid_from"/>
         </index>
         <checkConstraint constraint="((valid_from &lt; valid_to))" name="c_car_registration_to_after_from"/>
      </table>
      <table name="carmodel" numRows="0" remarks="Holds all car models" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('carmodel_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="serial" typeCode="4">
            <child column="id_carmodel" foreignKey="fk_car_id_carmodel" implied="false" onDeleteCascade="false" schema="public" table="car"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="id_manufacturer" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_carmodel_id_manufacturer" implied="false" onDeleteCascade="false" schema="public" table="manufacturer"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="classification" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="kw" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="ccm" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="doors" nullable="true" remarks="" size="5" type="int2" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="note" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="seat" nullable="true" remarks="The max number of seats in this carmodel" size="5" type="int2" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="wheelchairseat" nullable="true" remarks="The max number of wheelchairseats in this carmodel" size="5" type="int2" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_carmodel_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table name="jobtitle" numRows="0" remarks="Holds all job titles" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('jobtitle_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="5" type="int2" typeCode="5">
            <child column="id_jobtitle" foreignKey="fk_staff_contract_id_jobtitle" implied="false" onDeleteCascade="false" schema="public" table="staff_contract"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="code" nullable="false" remarks="Unique code of the job title" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="name" nullable="false" remarks="The name of the job title" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_jobtitle_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="u_jobtitle_code" unique="true">
            <column ascending="true" name="code"/>
         </index>
      </table>
      <table name="locale" numRows="0" remarks="Holds all locales" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('locale_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="5" type="int2" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="locale" nullable="false" remarks="The locale in format xx_XX" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="language" nullable="false" remarks="The 2 letter language code" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="3" name="active_01" nullable="false" remarks="TRUE means this locale is active" size="1" type="bool" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="position" nullable="false" remarks="The position of this locale" size="5" type="int2" typeCode="5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_locale_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="u_locale_locale" unique="true">
            <column ascending="true" name="locale"/>
         </index>
      </table>
      <table name="manufacturer" numRows="0" remarks="Holds all manufacturers" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('manufacturer_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="serial" typeCode="4">
            <child column="id_manufacturer" foreignKey="fk_carmodel_id_manufacturer" implied="false" onDeleteCascade="false" schema="public" table="carmodel"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_manufacturer_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table name="mileage" numRows="49" remarks="Holds all mileages" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('mileage_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="19" type="bigserial" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="1" name="created_at" nullable="false" remarks="Timestamp of creation" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="2" name="updated_at" nullable="false" remarks="Timestamp of last update" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="id_creator" nullable="false" remarks="Reference to the creator" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_mileage_id_creator" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="id_updater" nullable="false" remarks="Reference to the last updater" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_mileage_id_updater" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="id_car" nullable="false" remarks="Reference to the car" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_mileage_id_car" implied="false" onDeleteCascade="false" schema="public" table="car"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="id_mileagetype" nullable="false" remarks="Reference to the mileage type" size="5" type="int2" typeCode="5">
            <parent column="id" foreignKey="fk_mileage_id_mileagetype" implied="false" onDeleteCascade="false" schema="public" table="mileagetype"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="recorded_at" nullable="false" remarks="Timestamp when the mileage was recorded" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="km" nullable="false" remarks="The mileage [km]" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="note" nullable="true" remarks="A note for this trip" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="10" name="latitude" nullable="true" remarks="The latitude of this mileage" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="11" name="longitude" nullable="true" remarks="The longitude of this mileage" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="id_tenant" nullable="false" remarks="Reference to the tenant" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_mileage_id_tenant" implied="false" onDeleteCascade="false" schema="access" table="tenant"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_mileage_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="u_mileage_id_car_id_mileagetype_recorded_at" unique="true">
            <column ascending="true" name="id_car"/>
            <column ascending="true" name="id_mileagetype"/>
            <column ascending="true" name="recorded_at"/>
         </index>
      </table>
      <table name="mileagetype" numRows="0" remarks="Holds all mileage types" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('mileagetype_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="5" type="int2" typeCode="5">
            <child column="id_mileagetype" foreignKey="fk_mileage_id_mileagetype" implied="false" onDeleteCascade="false" schema="public" table="mileage"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="code" nullable="false" remarks="Unique internal code" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="name" nullable="false" remarks="The name" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_mileagetype_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="u_mileagetype_code" unique="true">
            <column ascending="true" name="code"/>
         </index>
      </table>
      <table name="staff" numRows="0" remarks="Holds all staff records" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('staff_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="19" type="bigserial" typeCode="-5">
            <child column="id_staff" foreignKey="fk_staff_contract_id_staff" implied="false" onDeleteCascade="false" schema="public" table="staff_contract"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="1" name="id_tenant" nullable="false" remarks="Reference to the tenant" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_staff_id_tenant" implied="false" onDeleteCascade="false" schema="access" table="tenant"/>
         </column>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="2" name="created_at" nullable="false" remarks="Timestamp of creation" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="3" name="updated_at" nullable="false" remarks="Timestamp of last update" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="id_creator" nullable="false" remarks="Reference to the creator" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_staff_id_creator" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="id_updater" nullable="false" remarks="Reference to the last updater" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_staff_id_updater" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="id_user" nullable="false" remarks="Reference to the user this staff record belongs to" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_staff_id_user" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="note" nullable="true" remarks="A note for this staff record" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="8" name="trash_01" nullable="true" remarks="TRUE means this staff record is deleted" size="1" type="bool" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_staff_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="u_staff_id_user" unique="true">
            <column ascending="true" name="id_user"/>
         </index>
      </table>
      <table name="staff_contract" numRows="23" remarks="Holds all staff contracts (e.g. work/employment contract)" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('staff_contract_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="19" type="bigserial" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="1" name="id_tenant" nullable="false" remarks="Reference to the tenant" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_staff_contract_id_tenant" implied="false" onDeleteCascade="false" schema="access" table="tenant"/>
         </column>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="2" name="created_at" nullable="false" remarks="Timestamp of creation" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="3" name="updated_at" nullable="false" remarks="Timestamp of last update" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="id_creator" nullable="false" remarks="Reference to the creator" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_staff_contract_id_creator" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="id_updater" nullable="false" remarks="Reference to the last updater" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_staff_contract_id_updater" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="id_staff" nullable="false" remarks="Reference to the staff record" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_staff_contract_id_staff" implied="false" onDeleteCascade="false" schema="public" table="staff"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="valid_from" nullable="false" remarks="Timestamp when the contract is valid from" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="8" name="valid_to" nullable="true" remarks="Timestamp until the contract is valid to" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="personnelnumber" nullable="true" remarks="The assigned personnel number in the periode (valid_from to valid_to)" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="note" nullable="true" remarks="A note for this contract" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="id_jobtitle" nullable="true" remarks="Reference to the job title" size="5" type="int2" typeCode="5">
            <parent column="id" foreignKey="fk_staff_contract_id_jobtitle" implied="false" onDeleteCascade="false" schema="public" table="jobtitle"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_staff_contract_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="no_overlap_staff_contract" unique="false">
            <column ascending="true" name="id_staff"/>
         </index>
         <index name="u_staff_contract_id_staff_valid_from" unique="true">
            <column ascending="true" name="id_staff"/>
            <column ascending="true" name="valid_from"/>
         </index>
         <checkConstraint constraint="((valid_from &lt; valid_to))" name="c_staff_contract_to_after_from"/>
      </table>
      <table name="trip" numRows="21" remarks="Holds all trips" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('trip_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="19" type="bigserial" typeCode="-5">
            <child column="id_trip" foreignKey="fk_accounting_id_trip" implied="false" onDeleteCascade="false" schema="accounting" table="accounting"/>
            <child column="id_trip" foreignKey="fk_trip_user_id_trip" implied="false" onDeleteCascade="false" schema="public" table="trip_user"/>
         </column>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="1" name="created_at" nullable="false" remarks="Timestamp of creation" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="2" name="updated_at" nullable="false" remarks="Timestamp of last update" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="id_creator" nullable="false" remarks="Reference to the creator" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_trip_id_creator" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="id_updater" nullable="false" remarks="Reference to the last updater" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_trip_id_updater" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="id_car" nullable="false" remarks="Reference to the car" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_trip_id_car" implied="false" onDeleteCascade="false" schema="public" table="car"/>
         </column>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="6" name="started_at" nullable="false" remarks="Timestamp when the trip started" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="stopped_at" nullable="true" remarks="Timestamp when the trip stopped" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="km_start" nullable="true" remarks="The mileage [km] at the start of the trip" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="km_stop" nullable="true" remarks="The mileage [km] at the end of the trip" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="note" nullable="true" remarks="A note for this trip" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="11" name="latitude_start" nullable="true" remarks="The latitude of the start of this trip" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="12" name="longitude_start" nullable="true" remarks="The longitude of the start of this trip" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="13" name="latitude_stop" nullable="true" remarks="The latitude of the stop of this trip" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="14" name="longitude_stop" nullable="true" remarks="The longitude of the stop of this trip" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="id_tenant" nullable="false" remarks="Reference to the tenant" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_trip_id_tenant" implied="false" onDeleteCascade="false" schema="access" table="tenant"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_trip_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_trip_date_started_at" unique="false"/>
         <index name="uidx_trip_id_car_stopped_at_null" unique="true">
            <column ascending="true" name="id_car"/>
         </index>
         <checkConstraint constraint="((started_at &lt; stopped_at))" name="c_trip_stop_after_start"/>
         <checkConstraint constraint="((km_start &lt;= km_stop))" name="c_trip_stopkm_after_startkm"/>
      </table>
      <table name="trip_user" numRows="31" remarks="Holds all trip users (driver, assistants and passengers)" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('trip_user_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="19" type="bigserial" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="1" name="id_tenant" nullable="false" remarks="Reference to the tenant" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_trip_user_id_tenant" implied="false" onDeleteCascade="false" schema="access" table="tenant"/>
         </column>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="2" name="created_at" nullable="false" remarks="Timestamp of creation" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="3" name="updated_at" nullable="false" remarks="Timestamp of last update" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="id_creator" nullable="false" remarks="Reference to the creator" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_trip_user_id_creator" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="id_updater" nullable="false" remarks="Reference to the last updater" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_trip_user_id_updater" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="id_trip" nullable="false" remarks="Reference to the trip" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="fk_trip_user_id_trip" implied="false" onDeleteCascade="false" schema="public" table="trip"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="id_user" nullable="false" remarks="Reference to the user (driver/assistant/passenger)" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="fk_trip_user_id_user" implied="false" onDeleteCascade="false" schema="access" table="user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="id_tripusertype" nullable="false" remarks="Reference to the trip user type (driver/assistant/passenger)" size="5" type="int2" typeCode="5">
            <parent column="id" foreignKey="fk_trip_user_id_tripusertype" implied="false" onDeleteCascade="false" schema="public" table="tripusertype"/>
         </column>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="9" name="started_at" nullable="false" remarks="Timestamp when the user started in the trip" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="10" name="stopped_at" nullable="true" remarks="Timestamp when the user stopped/exited this trip" size="29" type="timestamp" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="km_start" nullable="true" remarks="The mileage [km] at the moment the id_user assigned himself to the trip" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="km_stop" nullable="true" remarks="The mileage [km] at the moment the id_user removes himself from the trip" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="13" name="latitude_start" nullable="true" remarks="The latitude of the start of this trip user" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="14" name="longitude_start" nullable="true" remarks="The longitude of the start of this trip user" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="15" name="latitude_stop" nullable="true" remarks="The latitude of the stop of this trip user" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="17" id="16" name="longitude_stop" nullable="true" remarks="The longitude of the stop of this trip user" size="17" type="float8" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="note" nullable="true" remarks="A note for this trip" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_trip_user_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="u_trip_user_id_trip_id_user" unique="true">
            <column ascending="true" name="id_trip"/>
            <column ascending="true" name="id_user"/>
         </index>
         <checkConstraint constraint="((started_at &lt; stopped_at))" name="c_trip_user_stop_after_start"/>
         <checkConstraint constraint="((km_start &lt;= km_stop))" name="c_trip_user_stopkm_after_startkm"/>
      </table>
      <table name="tripusertype" numRows="0" remarks="Holds all trip user types" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('tripusertype_id_seq'::regclass)" digits="0" id="0" name="id" nullable="false" remarks="Unique ID" size="5" type="int2" typeCode="5">
            <child column="id_tripusertype" foreignKey="fk_trip_user_id_tripusertype" implied="false" onDeleteCascade="false" schema="public" table="trip_user"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="code" nullable="false" remarks="The unique code of this trip user type" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="id_accountingtype" nullable="true" remarks="Reference to the accounting type" size="5" type="int2" typeCode="5">
            <parent column="id" foreignKey="fk_tripusertype_id_accountingtype" implied="false" onDeleteCascade="false" schema="accounting" table="accountingtype"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="pk_tripusertype_id" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="u_tripusertype_code" unique="true">
            <column ascending="true" name="code"/>
         </index>
      </table>
   </tables>
</database>
