dnet-applications/apps/dnet-orgs-database-application/src/main/resources/static/dbmodel/oa_organizations.public.xml

462 lines
54 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<database name="oa_organizations" schema="public" type="PostgreSQL - 12.6">
<sequences>
<sequence increment="1" name="journal_jid_seq" startValue="1"/>
<sequence increment="1" name="organizations_id_seq" startValue="1"/>
</sequences>
<tables>
<table name="acronyms" numRows="143341" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="id" foreignKey="acronyms_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="acronym" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
<primaryKey column="id" sequenceNumberInPK="1"/>
<primaryKey column="acronym" sequenceNumberInPK="2"/>
<index name="acronyms_pkey" unique="true">
<column ascending="true" name="id"/>
<column ascending="true" name="acronym"/>
</index>
<index name="acronyms_id_idx" unique="false">
<column ascending="true" name="id"/>
</index>
</table>
<table name="conflict_groups_view" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT c.idgroup,&#10; o1.id AS id_1,&#10; o1.name AS name_1,&#10; o1.type AS type_1,&#10; o1.city AS city_1,&#10; o1.country AS country_1,&#10; o2.id AS id_2,&#10; o2.name AS name_2,&#10; o2.type AS type_2,&#10; o2.city AS city_2,&#10; o2.country AS country_2&#10; FROM ((oa_conflicts c&#10; LEFT JOIN organizations o1 ON ((c.id1 = o1.id)))&#10; LEFT JOIN organizations o2 ON ((c.id2 = o2.id)))&#10; WHERE ((o1.id IS NOT NULL) AND (o2.id IS NOT NULL) AND (o1.status = 'approved'::text) AND (o2.status = 'approved'::text) AND (c.idgroup IS NOT NULL) AND (c.reltype = 'suggested'::text));">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="idgroup" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="id_1" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="name_1" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="3" name="type_1" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="4" name="city_1" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="5" name="country_1" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="6" name="id_2" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="7" name="name_2" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="8" name="type_2" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="9" name="city_2" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="10" name="country_2" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
</table>
<table name="countries" numRows="259" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="val" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<child column="country" foreignKey="organizations_country_fkey" implied="false" onDeleteCascade="false" schema="public" table="organizations"/>
<child column="country" foreignKey="user_countries_country_fkey" implied="false" onDeleteCascade="false" schema="public" table="user_countries"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<primaryKey column="val" sequenceNumberInPK="1"/>
<index name="countries_pkey" unique="true">
<column ascending="true" name="val"/>
</index>
</table>
<table name="duplicate_groups_view" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT o.id,&#10; o.name,&#10; o.city,&#10; o.country,&#10; count(d.*) AS n_duplicates&#10; FROM (oa_duplicates d&#10; LEFT JOIN organizations o ON ((o.id = d.local_id)))&#10; WHERE ((d.reltype = 'suggested'::text) AND (o.status = 'approved'::text))&#10; GROUP BY o.id, o.name, o.city, o.country&#10; ORDER BY o.name;">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="city" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="3" name="country" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="4" name="n_duplicates" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
</table>
<table name="id_types" numRows="18" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="val" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<child column="type" foreignKey="other_ids_type_fkey" implied="false" onDeleteCascade="false" schema="public" table="other_ids"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<primaryKey column="val" sequenceNumberInPK="1"/>
<index name="id_types_pkey" unique="true">
<column ascending="true" name="val"/>
</index>
</table>
<table name="journal" numRows="336" remarks="" schema="public" type="TABLE">
<column autoUpdated="true" defaultValue="nextval('journal_jid_seq'::regclass)" digits="0" id="0" name="jid" nullable="false" remarks="" size="10" type="serial" typeCode="4"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="id" nullable="true" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="id" foreignKey="journal_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="operation" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="now()" digits="6" id="4" name="op_date" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="5" name="email" nullable="true" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="email" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" schema="public" table="users"/>
</column>
<primaryKey column="jid" sequenceNumberInPK="1"/>
<index name="journal_pkey" unique="true">
<column ascending="true" name="jid"/>
</index>
<index name="journal_id_idx" unique="false">
<column ascending="true" name="id"/>
</index>
</table>
<table name="languages" numRows="114" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="val" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<child column="lang" foreignKey="other_names_lang_fkey" implied="false" onDeleteCascade="false" schema="public" table="other_names"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<primaryKey column="val" sequenceNumberInPK="1"/>
<index name="languages_pkey" unique="true">
<column ascending="true" name="val"/>
</index>
</table>
<table name="notes" numRows="6" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="id" foreignKey="notes_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="note" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="modified_by" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="6" id="3" name="modification_date" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
<primaryKey column="id" sequenceNumberInPK="1"/>
<index name="notes_pkey" unique="true">
<column ascending="true" name="id"/>
</index>
</table>
<table name="oa_conflicts" numRows="31290" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id1" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="id" foreignKey="oa_conflicts_id1_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="id2" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="id" foreignKey="oa_conflicts_id2_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
</column>
<column autoUpdated="false" defaultValue="'suggested'::text" digits="0" id="2" name="reltype" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="3" name="idgroup" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="now()" digits="6" id="4" name="creation_date" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
<column autoUpdated="false" defaultValue="now()" digits="6" id="5" name="modification_date" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="6" name="modified_by" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="7" name="created_by" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<primaryKey column="id1" sequenceNumberInPK="1"/>
<primaryKey column="id2" sequenceNumberInPK="2"/>
<index name="oa_conflicts_pkey" unique="true">
<column ascending="true" name="id1"/>
<column ascending="true" name="id2"/>
</index>
<index name="oa_conflicts_id1_idx" unique="false">
<column ascending="true" name="id1"/>
</index>
<index name="oa_conflicts_id2_idx" unique="false">
<column ascending="true" name="id2"/>
</index>
<index name="oa_conflicts_idgroup_idx" unique="false">
<column ascending="true" name="idgroup"/>
</index>
</table>
<table name="oa_duplicates" numRows="219113" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="local_id" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="id" foreignKey="oa_duplicates_local_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="oa_original_id" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="id" foreignKey="oa_duplicates_oa_original_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="oa_collectedfrom" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="'suggested'::text" digits="0" id="3" name="reltype" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="now()" digits="6" id="4" name="creation_date" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
<column autoUpdated="false" defaultValue="now()" digits="6" id="5" name="modification_date" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="6" name="modified_by" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="7" name="created_by" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<primaryKey column="local_id" sequenceNumberInPK="1"/>
<primaryKey column="oa_original_id" sequenceNumberInPK="2"/>
<index name="oa_duplicates_pkey" unique="true">
<column ascending="true" name="local_id"/>
<column ascending="true" name="oa_original_id"/>
</index>
<index name="oa_duplicates_local_id_idx" unique="false">
<column ascending="true" name="local_id"/>
</index>
</table>
<table name="oa_duplicates_view" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT d.local_id,&#10; d.oa_original_id,&#10; o.name AS oa_name,&#10; array_to_string(array_agg(DISTINCT a.acronym), ', '::text) AS oa_acronym,&#10; o.country AS oa_country,&#10; array_to_string(array_agg(DISTINCT u.url), ', '::text) AS oa_url,&#10; COALESCE(jsonb_agg(DISTINCT jsonb_build_object('id', oid.otherid, 'type', oid.type)) FILTER (WHERE (oid.otherid IS NOT NULL)), '[]'::jsonb) AS oa_other_ids,&#10; d.oa_collectedfrom,&#10; d.reltype,&#10; d.created_by,&#10; o.ec_legalbody,&#10; o.ec_legalperson,&#10; o.ec_nonprofit,&#10; o.ec_researchorganization,&#10; o.ec_highereducation,&#10; o.ec_internationalorganizationeurinterests,&#10; o.ec_internationalorganization,&#10; o.ec_enterprise,&#10; o.ec_smevalidated,&#10; o.ec_nutscode&#10; FROM ((((oa_duplicates d&#10; LEFT JOIN organizations o ON ((o.id = d.oa_original_id)))&#10; LEFT JOIN acronyms a ON ((o.id = a.id)))&#10; LEFT JOIN urls u ON ((o.id = u.id)))&#10; LEFT JOIN other_ids oid ON ((o.id = oid.id)))&#10; GROUP BY d.local_id, d.oa_original_id, d.created_by, o.name, o.country, d.oa_collectedfrom, d.reltype, o.ec_legalbody, o.ec_legalperson, o.ec_nonprofit, o.ec_researchorganization, o.ec_highereducation, o.ec_internationalorganizationeurinterests, o.ec_internationalorganization, o.ec_enterprise, o.ec_smevalidated, o.ec_nutscode;">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="local_id" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="oa_original_id" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="oa_name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="3" name="oa_acronym" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="4" name="oa_country" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="5" name="oa_url" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="6" name="oa_other_ids" nullable="true" remarks="" size="2147483647" type="jsonb" typeCode="1111"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="7" name="oa_collectedfrom" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="8" name="reltype" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="9" name="created_by" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="10" name="ec_legalbody" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="11" name="ec_legalperson" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="12" name="ec_nonprofit" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="13" name="ec_researchorganization" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="14" name="ec_highereducation" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="15" name="ec_internationalorganizationeurinterests" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="16" name="ec_internationalorganization" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="17" name="ec_enterprise" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="18" name="ec_smevalidated" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="19" name="ec_nutscode" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
</table>
<table name="org_index_search" numRows="497675" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="txt" nullable="true" remarks="" size="2147483647" type="tsvector" typeCode="1111"/>
<primaryKey column="id" sequenceNumberInPK="1"/>
<index name="org_index_search_pkey" unique="true">
<column ascending="true" name="id"/>
</index>
<index name="org_index_search_txt_idx" unique="false">
<column ascending="true" name="txt"/>
</index>
</table>
<table name="org_types" numRows="9" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="val" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<child column="type" foreignKey="organizations_type_fkey" implied="false" onDeleteCascade="false" schema="public" table="organizations"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<primaryKey column="val" sequenceNumberInPK="1"/>
<index name="org_types_pkey" unique="true">
<column ascending="true" name="val"/>
</index>
</table>
<table name="organizations" numRows="497673" remarks="" schema="public" type="TABLE">
<column autoUpdated="true" defaultValue="('openorgs____::'::text || lpad((nextval('organizations_id_seq'::regclass))::text, 10, '0'::text))" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<child column="id" foreignKey="acronyms_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="acronyms"/>
<child column="id" foreignKey="journal_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="journal"/>
<child column="id" foreignKey="notes_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="notes"/>
<child column="id1" foreignKey="oa_conflicts_id1_fkey" implied="false" onDeleteCascade="true" schema="public" table="oa_conflicts"/>
<child column="id2" foreignKey="oa_conflicts_id2_fkey" implied="false" onDeleteCascade="true" schema="public" table="oa_conflicts"/>
<child column="local_id" foreignKey="oa_duplicates_local_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="oa_duplicates"/>
<child column="oa_original_id" foreignKey="oa_duplicates_oa_original_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="oa_duplicates"/>
<child column="id" foreignKey="other_ids_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="other_ids"/>
<child column="id" foreignKey="other_names_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="other_names"/>
<child column="id1" foreignKey="relationships_id1_fkey" implied="false" onDeleteCascade="true" schema="public" table="relationships"/>
<child column="id2" foreignKey="relationships_id2_fkey" implied="false" onDeleteCascade="true" schema="public" table="relationships"/>
<child column="id" foreignKey="urls_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="urls"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="'UNKNOWN'::text" digits="0" id="2" name="type" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="val" foreignKey="organizations_type_fkey" implied="false" onDeleteCascade="false" schema="public" table="org_types"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="17" id="3" name="lat" nullable="true" remarks="" size="17" type="float8" typeCode="8"/>
<column autoUpdated="false" defaultValue="null" digits="17" id="4" name="lng" nullable="true" remarks="" size="17" type="float8" typeCode="8"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="5" name="city" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="6" name="country" nullable="true" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="val" foreignKey="organizations_country_fkey" implied="false" onDeleteCascade="false" schema="public" table="countries"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="7" name="created_by" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="now()" digits="6" id="8" name="creation_date" nullable="true" remarks="" size="35" type="timestamptz" typeCode="93"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="9" name="modified_by" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="now()" digits="6" id="10" name="modification_date" nullable="true" remarks="" size="35" type="timestamptz" typeCode="93"/>
<column autoUpdated="false" defaultValue="'suggested'::text" digits="0" id="11" name="status" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="12" name="ec_legalbody" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="13" name="ec_legalperson" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="14" name="ec_nonprofit" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="15" name="ec_researchorganization" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="16" name="ec_highereducation" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="17" name="ec_internationalorganizationeurinterests" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="18" name="ec_internationalorganization" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="19" name="ec_enterprise" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="20" name="ec_smevalidated" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="21" name="ec_nutscode" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<primaryKey column="id" sequenceNumberInPK="1"/>
<index name="organizations_pkey" unique="true">
<column ascending="true" name="id"/>
</index>
<index name="organizations_country_idx" unique="false">
<column ascending="true" name="country"/>
</index>
<index name="organizations_type_idx" unique="false">
<column ascending="true" name="type"/>
</index>
</table>
<table name="organizations_info_view" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT org.id,&#10; org.name,&#10; org.created_by,&#10; org.creation_date,&#10; org.modified_by,&#10; org.modification_date,&#10; count(DISTINCT d.oa_original_id) AS n_duplicates,&#10; count(DISTINCT c.id2) AS n_conflicts,&#10; (count(DISTINCT n.note) &gt; 0) AS note&#10; FROM (((organizations org&#10; LEFT JOIN oa_duplicates d ON (((org.id = d.local_id) AND (d.reltype = 'suggested'::text))))&#10; LEFT JOIN oa_conflicts c ON (((org.id = c.id1) AND (c.reltype = 'suggested'::text))))&#10; LEFT JOIN notes n ON ((org.id = n.id)))&#10; GROUP BY org.id;">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="created_by" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="6" id="3" name="creation_date" nullable="true" remarks="" size="35" type="timestamptz" typeCode="93"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="4" name="modified_by" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="6" id="5" name="modification_date" nullable="true" remarks="" size="35" type="timestamptz" typeCode="93"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="6" name="n_duplicates" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="7" name="n_conflicts" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="8" name="note" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
</table>
<table name="organizations_simple_view" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT org.id,&#10; org.name,&#10; org.type,&#10; org.city,&#10; org.country,&#10; org.status,&#10; array_remove(array_agg(DISTINCT a.acronym), NULL::text) AS acronyms,&#10; array_remove(array_agg(DISTINCT u.url), NULL::text) AS urls,&#10; count(DISTINCT d1.oa_original_id) FILTER (WHERE (d1.reltype = 'is_similar'::text)) AS n_similar_dups,&#10; count(DISTINCT d1.oa_original_id) FILTER (WHERE (d1.reltype = 'suggested'::text)) AS n_suggested_dups,&#10; count(DISTINCT d1.oa_original_id) FILTER (WHERE (d1.reltype = 'is_different'::text)) AS n_different_dups,&#10; ((org.status = 'raw'::text) AND (NOT ('is_similar'::text = ANY (array_agg(d2.reltype))))) AS candidate_dup&#10; FROM ((((organizations org&#10; LEFT JOIN acronyms a ON ((org.id = a.id)))&#10; LEFT JOIN urls u ON ((org.id = u.id)))&#10; LEFT JOIN oa_duplicates d1 ON ((org.id = d1.local_id)))&#10; LEFT JOIN oa_duplicates d2 ON ((org.id = d2.oa_original_id)))&#10; GROUP BY org.id, org.name, org.type, org.city, org.country, org.status;">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="type" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="3" name="city" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="4" name="country" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="5" name="status" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="6" name="acronyms" nullable="true" remarks="" size="2147483647" type="_text" typeCode="2003"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="7" name="urls" nullable="true" remarks="" size="2147483647" type="_text" typeCode="2003"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="8" name="n_similar_dups" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="9" name="n_suggested_dups" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="10" name="n_different_dups" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="11" name="candidate_dup" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
</table>
<table name="organizations_view" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT org.id,&#10; org.name,&#10; org.type,&#10; org.lat,&#10; org.lng,&#10; org.city,&#10; org.country,&#10; org.status,&#10; org.ec_legalbody,&#10; org.ec_legalperson,&#10; org.ec_nonprofit,&#10; org.ec_researchorganization,&#10; org.ec_highereducation,&#10; org.ec_internationalorganizationeurinterests,&#10; org.ec_internationalorganization,&#10; org.ec_enterprise,&#10; org.ec_smevalidated,&#10; org.ec_nutscode,&#10; COALESCE(jsonb_agg(DISTINCT jsonb_build_object('id', oid.otherid, 'type', oid.type)) FILTER (WHERE (oid.otherid IS NOT NULL)), '[]'::jsonb) AS other_ids,&#10; COALESCE(jsonb_agg(DISTINCT jsonb_build_object('name', n.name, 'lang', n.lang)) FILTER (WHERE (n.name IS NOT NULL)), '[]'::jsonb) AS other_names,&#10; COALESCE(jsonb_agg(DISTINCT a.acronym) FILTER (WHERE (a.acronym IS NOT NULL)), '[]'::jsonb) AS acronyms,&#10; COALESCE(jsonb_agg(DISTINCT u.url) FILTER (WHERE (u.url IS NOT NULL)), '[]'::jsonb) AS urls,&#10; COALESCE(jsonb_agg(DISTINCT jsonb_build_object('relatedOrgId', relorg.id, 'relatedOrgName', relorg.name, 'type', r.reltype)) FILTER (WHERE (relorg.id IS NOT NULL)), '[]'::jsonb) AS relations&#10; FROM ((((((organizations org&#10; LEFT JOIN other_ids oid ON ((org.id = oid.id)))&#10; LEFT JOIN other_names n ON ((org.id = n.id)))&#10; LEFT JOIN acronyms a ON ((org.id = a.id)))&#10; LEFT JOIN urls u ON ((org.id = u.id)))&#10; LEFT JOIN relationships r ON ((org.id = r.id1)))&#10; LEFT JOIN organizations relorg ON ((relorg.id = r.id2)))&#10; GROUP BY org.id, org.name, org.type, org.lat, org.lng, org.city, org.country, org.status, org.ec_legalbody, org.ec_legalperson, org.ec_nonprofit, org.ec_researchorganization, org.ec_highereducation, org.ec_internationalorganizationeurinterests, org.ec_internationalorganization, org.ec_enterprise, org.ec_smevalidated, org.ec_nutscode;">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="type" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="17" id="3" name="lat" nullable="true" remarks="" size="17" type="float8" typeCode="8"/>
<column autoUpdated="false" defaultValue="null" digits="17" id="4" name="lng" nullable="true" remarks="" size="17" type="float8" typeCode="8"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="5" name="city" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="6" name="country" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="7" name="status" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="8" name="ec_legalbody" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="9" name="ec_legalperson" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="10" name="ec_nonprofit" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="11" name="ec_researchorganization" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="12" name="ec_highereducation" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="13" name="ec_internationalorganizationeurinterests" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="14" name="ec_internationalorganization" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="15" name="ec_enterprise" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="16" name="ec_smevalidated" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="17" name="ec_nutscode" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="18" name="other_ids" nullable="true" remarks="" size="2147483647" type="jsonb" typeCode="1111"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="19" name="other_names" nullable="true" remarks="" size="2147483647" type="jsonb" typeCode="1111"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="20" name="acronyms" nullable="true" remarks="" size="2147483647" type="jsonb" typeCode="1111"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="21" name="urls" nullable="true" remarks="" size="2147483647" type="jsonb" typeCode="1111"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="22" name="relations" nullable="true" remarks="" size="2147483647" type="jsonb" typeCode="1111"/>
</table>
<table name="other_ids" numRows="344848" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="id" foreignKey="other_ids_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="otherid" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="type" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="val" foreignKey="other_ids_type_fkey" implied="false" onDeleteCascade="false" schema="public" table="id_types"/>
</column>
<primaryKey column="id" sequenceNumberInPK="1"/>
<primaryKey column="otherid" sequenceNumberInPK="2"/>
<primaryKey column="type" sequenceNumberInPK="3"/>
<index name="other_ids_pkey" unique="true">
<column ascending="true" name="id"/>
<column ascending="true" name="otherid"/>
<column ascending="true" name="type"/>
</index>
<index name="other_ids_id_idx" unique="false">
<column ascending="true" name="id"/>
</index>
</table>
<table name="other_names" numRows="146698" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="id" foreignKey="other_names_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="lang" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="val" foreignKey="other_names_lang_fkey" implied="false" onDeleteCascade="false" schema="public" table="languages"/>
</column>
<primaryKey column="id" sequenceNumberInPK="1"/>
<primaryKey column="name" sequenceNumberInPK="2"/>
<primaryKey column="lang" sequenceNumberInPK="3"/>
<index name="other_names_pkey" unique="true">
<column ascending="true" name="id"/>
<column ascending="true" name="name"/>
<column ascending="true" name="lang"/>
</index>
<index name="other_names_id_idx" unique="false">
<column ascending="true" name="id"/>
</index>
</table>
<table name="relationships" numRows="37572" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id1" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="id" foreignKey="relationships_id1_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="reltype" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="id2" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="id" foreignKey="relationships_id2_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
</column>
<primaryKey column="id1" sequenceNumberInPK="1"/>
<primaryKey column="reltype" sequenceNumberInPK="2"/>
<primaryKey column="id2" sequenceNumberInPK="3"/>
<index name="relationships_pkey" unique="true">
<column ascending="true" name="id1"/>
<column ascending="true" name="reltype"/>
<column ascending="true" name="id2"/>
</index>
<index name="relationships_id1_idx" unique="false">
<column ascending="true" name="id1"/>
</index>
<index name="relationships_id2_idx" unique="false">
<column ascending="true" name="id2"/>
</index>
</table>
<table name="suggestions_info_by_country_view" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT c.val AS code,&#10; c.name,&#10; COALESCE(t1.n_duplicates, (0)::bigint) AS n_duplicates,&#10; COALESCE(t2.n_conflicts, (0)::bigint) AS n_conflicts,&#10; COALESCE(t3.n_pending_orgs, (0)::bigint) AS n_pending_orgs&#10; FROM (((countries c&#10; LEFT JOIN ( SELECT o.country,&#10; count(DISTINCT d.local_id) AS n_duplicates&#10; FROM (oa_duplicates d&#10; LEFT JOIN organizations o ON ((d.local_id = o.id)))&#10; WHERE ((d.reltype = 'suggested'::text) AND (o.status = 'approved'::text))&#10; GROUP BY o.country) t1 ON ((t1.country = c.val)))&#10; LEFT JOIN ( SELECT o.country,&#10; count(DISTINCT c_1.idgroup) AS n_conflicts&#10; FROM (oa_conflicts c_1&#10; LEFT JOIN organizations o ON ((c_1.id1 = o.id)))&#10; WHERE ((c_1.reltype = 'suggested'::text) AND (o.status = 'approved'::text))&#10; GROUP BY o.country) t2 ON ((t2.country = c.val)))&#10; LEFT JOIN ( SELECT o.country,&#10; count(DISTINCT o.id) AS n_pending_orgs&#10; FROM organizations o&#10; WHERE (o.status = 'suggested'::text)&#10; GROUP BY o.country) t3 ON ((t3.country = c.val)))&#10; ORDER BY c.name;">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="code" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="n_duplicates" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="3" name="n_conflicts" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="4" name="n_pending_orgs" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
</table>
<table name="tmp_dedup_events" numRows="236394" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="ec_enterprise" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="ec_highereducation" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="ec_internationalorganization" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="3" name="ec_internationalorganizationeurinterests" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="4" name="ec_legalbody" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="5" name="ec_legalperson" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="6" name="ec_nonprofit" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="7" name="ec_nutscode" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="8" name="ec_researchorganization" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="9" name="ec_smevalidated" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="10" name="group_id" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="11" name="local_id" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="12" name="oa_acronym" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="13" name="oa_collectedfrom" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="14" name="oa_country" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="15" name="oa_name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="16" name="oa_original_id" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="17" name="oa_url" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="18" name="pid_list" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
</table>
<table name="urls" numRows="216223" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="id" foreignKey="urls_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="url" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
<primaryKey column="id" sequenceNumberInPK="1"/>
<primaryKey column="url" sequenceNumberInPK="2"/>
<index name="urls_pkey" unique="true">
<column ascending="true" name="id"/>
<column ascending="true" name="url"/>
</index>
<index name="urls_id_idx" unique="false">
<column ascending="true" name="id"/>
</index>
</table>
<table name="user_countries" numRows="51" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="email" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="email" foreignKey="user_countries_email_fkey" implied="false" onDeleteCascade="true" schema="public" table="users"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="country" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="val" foreignKey="user_countries_country_fkey" implied="false" onDeleteCascade="false" schema="public" table="countries"/>
</column>
<primaryKey column="email" sequenceNumberInPK="1"/>
<primaryKey column="country" sequenceNumberInPK="2"/>
<index name="user_countries_pkey" unique="true">
<column ascending="true" name="email"/>
<column ascending="true" name="country"/>
</index>
</table>
<table name="user_roles" numRows="5" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="role" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<child column="role" foreignKey="users_role_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
<child column="role" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" schema="public" table="users_view"/>
</column>
<primaryKey column="role" sequenceNumberInPK="1"/>
<index name="user_roles_pkey" unique="true">
<column ascending="true" name="role"/>
</index>
</table>
<table name="users" numRows="26" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="email" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<child column="email" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" schema="public" table="journal"/>
<child column="email" foreignKey="user_countries_email_fkey" implied="false" onDeleteCascade="true" schema="public" table="user_countries"/>
<child column="email" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" schema="public" table="users_view"/>
</column>
<column autoUpdated="false" defaultValue="true" digits="0" id="1" name="valid" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="'USER'::text" digits="0" id="2" name="role" nullable="false" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="role" foreignKey="users_role_fkey" implied="false" onDeleteCascade="false" schema="public" table="user_roles"/>
</column>
<column autoUpdated="false" defaultValue="now()" digits="6" id="3" name="first_access" nullable="true" remarks="" size="35" type="timestamptz" typeCode="93"/>
<column autoUpdated="false" defaultValue="now()" digits="6" id="4" name="last_access" nullable="true" remarks="" size="35" type="timestamptz" typeCode="93"/>
<primaryKey column="email" sequenceNumberInPK="1"/>
<index name="users_pkey" unique="true">
<column ascending="true" name="email"/>
</index>
</table>
<table name="users_view" numRows="0" remarks="" schema="public" type="VIEW" viewSql=" SELECT u.email,&#10; u.valid,&#10; u.role,&#10; u.first_access,&#10; u.last_access,&#10; array_remove(array_agg(uc.country), NULL::text) AS countries&#10; FROM (users u&#10; LEFT JOIN user_countries uc ON ((u.email = uc.email)))&#10; GROUP BY u.email, u.valid, u.role, u.first_access, u.last_access&#10; ORDER BY u.email;">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="email" nullable="true" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="email" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" schema="public" table="users"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="valid" nullable="true" remarks="" size="1" type="bool" typeCode="-7"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="role" nullable="true" remarks="" size="2147483647" type="text" typeCode="12">
<parent column="role" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" schema="public" table="user_roles"/>
</column>
<column autoUpdated="false" defaultValue="null" digits="6" id="3" name="first_access" nullable="true" remarks="" size="35" type="timestamptz" typeCode="93"/>
<column autoUpdated="false" defaultValue="null" digits="6" id="4" name="last_access" nullable="true" remarks="" size="35" type="timestamptz" typeCode="93"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="5" name="countries" nullable="true" remarks="" size="2147483647" type="_text" typeCode="2003"/>
</table>
</tables>
</database>