Files
alfresco-community-repo/config/alfresco/dbscripts/create/org.hibernate.dialect.PostgreSQLDialect/Schema-Reference-AVM.xml
Dave Ward ff2ae89c08 Merged V4.0-BUG-FIX to HEAD
36915: ALF-12874: Schema reference files are out of date
   - Difference: expected primary key .alf_tenant.PRIMARY.columnNames[0]="id", but was .alf_tenant.PRIMARY.columnNames[0]="tenant_domain"
   - fixed the rename of alf_tenant PK "id" -> "tenant_domain" (for all 5 DB types)
   36950: Merged V4.0 to V4.0-BUG-FIX (RECORD ONLY)
      36917: Merged V4.0-BUG-FIX to V4.0
         36915: ALF-12874: Schema reference files are out of date
         - Difference: expected primary key .alf_tenant.PRIMARY.columnNames[0]="id", but was .alf_tenant.PRIMARY.columnNames[0]="tenant_domain"
         - fixed the rename of alf_tenant PK "id" -> "tenant_domain" (for all 5 DB types)
   36951: Merged V4.0 (4.0.2) to V4.0-BUG-FIX (4.0.3)
      36949: ALF-13745: Merged V3.4-BUG-FIX (3.4.10) to V4.0 (4.0.2)
         36948: ALF-13667 Additional OpenOffice mimetypes to be added to the mime-type maps
            - On reflection the maxSourceSizeKBytes limits for power point files were too small. Did not take into account
              images in the files rather than just text.
      36923: Merged DEV to V4.0
         36600: ALF-14129 : Failed to do upgrade from 3.4.8 to 4.0.2
            Statements from ActivitiTaskIdIndexes.sql script were marked as optional.
      36922: Merged DEV to V4.0
         36729: ALF-14129 : Failed to do upgrade from 3.4.8 to 4.0.2
            Outdated Schema-Reference-ACT.xml were updated for all dialects and regression after ALF-12874 was fixed.
   36953: Merged BRANCHES/DEV/V3.4-BUG-FIX to BRANCHES/DEV/V4.0-BUG-FIX
      36905: ALF-14178 Share - Path issue with number of character limitation. Updated qname to max DB limit of 255 chars.
   36954: ALF-14209 SOLR - does not support query for all stores
   - it is now possible for SOLR to track any store and Alfresco to execute queries against that store (no federation or sharding yet ....)
   36965: Extra debugging after review of ALF-14238
   37032: ALF-12723: Missing mergeinfo for r34655
   37033: Merged V4.0 to V4.0-BUG-FIX
      36999: ALF-5285: Reverse merging r26226, as it causes regressions ALF-14202, ALF-14242 and ALF-14245
      37001: ALF-14169: Alfresco startup fails if XAM module was deployed
         Jan approved fix
      37005: ALF-14169: Fix unit test compilation
      37020: Resolved some "Patch description is not available" warnings in 4.0.2
      37022: ALF-12874: Schema reference files are out of date
      - Fixed up PostgreSQL diffs
      37027: ALF-12874: Schema reference files are out of date
      - DB2 fixes by Dmitry


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@37036 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2012-05-25 17:19:13 +00:00

753 lines
26 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.alfresco.org/repo/db-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.alfresco.org/repo/db-schema db-schema.xsd" name="" dbprefix="avm_" version="5026">
<validators>
<validator class="org.alfresco.util.schemacomp.validator.NameValidator">
<properties>
<property name="pattern">.*</property>
</properties>
</validator>
<validator class="org.alfresco.util.schemacomp.validator.SchemaVersionValidator"/>
</validators>
<objects>
<sequence name="avm_nodes_seq"/>
<sequence name="avm_store_properties_seq"/>
<sequence name="avm_stores_seq"/>
<sequence name="avm_version_roots_seq"/>
<table name="avm_aspects">
<columns>
<column name="node_id" order="1">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="qname_id" order="2">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="avm_aspects_pkey">
<columnnames>
<columnname order="1">node_id</columnname>
<columnname order="2">qname_id</columnname>
</columnnames>
</primarykey>
<foreignkeys>
<foreignkey name="fk_avm_nasp_qn">
<localcolumn>qname_id</localcolumn>
<targettable>alf_qname</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
<foreignkey name="fk_avm_nasp_n">
<localcolumn>node_id</localcolumn>
<targettable>avm_nodes</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
</foreignkeys>
<indexes>
<index name="fk_avm_nasp_n" unique="false">
<columnnames>
<columnname>node_id</columnname>
</columnnames>
</index>
<index name="fk_avm_nasp_qn" unique="false">
<columnnames>
<columnname>qname_id</columnname>
</columnnames>
</index>
</indexes>
</table>
<table name="avm_child_entries">
<columns>
<column name="parent_id" order="1">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="lc_name" order="2">
<type>varchar(160)</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="name" order="3">
<type>varchar(160)</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="child_id" order="4">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="avm_child_entries_pkey">
<columnnames>
<columnname order="1">parent_id</columnname>
<columnname order="2">lc_name</columnname>
</columnnames>
</primarykey>
<foreignkeys>
<foreignkey name="fk_avm_ce_parent">
<localcolumn>parent_id</localcolumn>
<targettable>avm_nodes</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
<foreignkey name="fk_avm_ce_child">
<localcolumn>child_id</localcolumn>
<targettable>avm_nodes</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
</foreignkeys>
<indexes>
<index name="fk_avm_ce_child" unique="false">
<columnnames>
<columnname>child_id</columnname>
</columnnames>
</index>
<index name="fk_avm_ce_parent" unique="false">
<columnnames>
<columnname>parent_id</columnname>
</columnnames>
</index>
<index name="idx_avm_ce_lc_name" unique="false">
<columnnames>
<columnname>lc_name</columnname>
<columnname>parent_id</columnname>
</columnnames>
</index>
</indexes>
</table>
<table name="avm_history_links">
<columns>
<column name="ancestor" order="1">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="descendent" order="2">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="avm_history_links_pkey">
<columnnames>
<columnname order="1">ancestor</columnname>
<columnname order="2">descendent</columnname>
</columnnames>
</primarykey>
<foreignkeys>
<foreignkey name="fk_avm_hl_ancestor">
<localcolumn>ancestor</localcolumn>
<targettable>avm_nodes</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
<foreignkey name="fk_avm_hl_desc">
<localcolumn>descendent</localcolumn>
<targettable>avm_nodes</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
</foreignkeys>
<indexes>
<index name="fk_avm_hl_ancestor" unique="false">
<columnnames>
<columnname>ancestor</columnname>
</columnnames>
</index>
<index name="fk_avm_hl_desc" unique="false">
<columnnames>
<columnname>descendent</columnname>
</columnnames>
</index>
<index name="idx_avm_hl_revpk" unique="false">
<columnnames>
<columnname>descendent</columnname>
<columnname>ancestor</columnname>
</columnnames>
</index>
</indexes>
</table>
<table name="avm_merge_links">
<columns>
<column name="mfrom" order="1">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="mto" order="2">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="avm_merge_links_pkey">
<columnnames>
<columnname order="1">mfrom</columnname>
<columnname order="2">mto</columnname>
</columnnames>
</primarykey>
<foreignkeys>
<foreignkey name="fk_avm_ml_to">
<localcolumn>mto</localcolumn>
<targettable>avm_nodes</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
<foreignkey name="fk_avm_ml_from">
<localcolumn>mfrom</localcolumn>
<targettable>avm_nodes</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
</foreignkeys>
<indexes>
<index name="fk_avm_ml_from" unique="false">
<columnnames>
<columnname>mfrom</columnname>
</columnnames>
</index>
<index name="fk_avm_ml_to" unique="false">
<columnnames>
<columnname>mto</columnname>
</columnnames>
</index>
</indexes>
</table>
<table name="avm_node_properties">
<columns>
<column name="node_id" order="1">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="actual_type_n" order="2">
<type>int4</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="persisted_type_n" order="3">
<type>int4</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="multi_valued" order="4">
<type>bool</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="boolean_value" order="5">
<type>bool</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="long_value" order="6">
<type>int8</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="float_value" order="7">
<type>float4</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="double_value" order="8">
<type>float8</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="string_value" order="9">
<type>varchar(1024)</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="serializable_value" order="10">
<type>bytea</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="qname_id" order="11">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="avm_node_properties_pkey">
<columnnames>
<columnname order="1">node_id</columnname>
<columnname order="2">qname_id</columnname>
</columnnames>
</primarykey>
<foreignkeys>
<foreignkey name="fk_avm_nprop_qn">
<localcolumn>qname_id</localcolumn>
<targettable>alf_qname</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
<foreignkey name="fk_avm_nprop_n">
<localcolumn>node_id</localcolumn>
<targettable>avm_nodes</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
</foreignkeys>
<indexes>
<index name="fk_avm_nprop_n" unique="false">
<columnnames>
<columnname>node_id</columnname>
</columnnames>
</index>
<index name="fk_avm_nprop_qn" unique="false">
<columnnames>
<columnname>qname_id</columnname>
</columnnames>
</index>
</indexes>
</table>
<table name="avm_nodes">
<columns>
<column name="id" order="1">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="class_type" order="2">
<type>varchar(20)</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="vers" order="3">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="version_id" order="4">
<type>int4</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="guid" order="5">
<type>varchar(36)</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="creator" order="6">
<type>varchar(255)</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="owner" order="7">
<type>varchar(255)</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="lastmodifier" order="8">
<type>varchar(255)</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="createdate" order="9">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="moddate" order="10">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="accessdate" order="11">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="is_root" order="12">
<type>bool</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="store_new_id" order="13">
<type>int8</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="acl_id" order="14">
<type>int8</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="deletedtype" order="15">
<type>int4</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="layer_id" order="16">
<type>int8</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="indirection" order="17">
<type>varchar(1024)</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="indirection_version" order="18">
<type>int4</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="primary_indirection" order="19">
<type>bool</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="opacity" order="20">
<type>bool</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="content_url" order="21">
<type>varchar(128)</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="mime_type" order="22">
<type>varchar(100)</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="encoding" order="23">
<type>varchar(16)</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="length" order="24">
<type>int8</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="avm_nodes_pkey">
<columnnames>
<columnname order="1">id</columnname>
</columnnames>
</primarykey>
<foreignkeys>
<foreignkey name="fk_avm_n_acl">
<localcolumn>acl_id</localcolumn>
<targettable>alf_access_control_list</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
<foreignkey name="fk_avm_n_store">
<localcolumn>store_new_id</localcolumn>
<targettable>avm_stores</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
</foreignkeys>
<indexes>
<index name="fk_avm_n_acl" unique="false">
<columnnames>
<columnname>acl_id</columnname>
</columnnames>
</index>
<index name="fk_avm_n_store" unique="false">
<columnnames>
<columnname>store_new_id</columnname>
</columnnames>
</index>
<index name="idx_avm_n_pi" unique="false">
<columnnames>
<columnname>primary_indirection</columnname>
</columnnames>
</index>
</indexes>
</table>
<table name="avm_store_properties">
<columns>
<column name="id" order="1">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="avm_store_id" order="2">
<type>int8</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="qname_id" order="3">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="actual_type_n" order="4">
<type>int4</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="persisted_type_n" order="5">
<type>int4</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="multi_valued" order="6">
<type>bool</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="boolean_value" order="7">
<type>bool</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="long_value" order="8">
<type>int8</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="float_value" order="9">
<type>float4</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="double_value" order="10">
<type>float8</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="string_value" order="11">
<type>varchar(1024)</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="serializable_value" order="12">
<type>bytea</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="avm_store_properties_pkey">
<columnnames>
<columnname order="1">id</columnname>
</columnnames>
</primarykey>
<foreignkeys>
<foreignkey name="fk_avm_sprop_qname">
<localcolumn>qname_id</localcolumn>
<targettable>alf_qname</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
<foreignkey name="fk_avm_sprop_store">
<localcolumn>avm_store_id</localcolumn>
<targettable>avm_stores</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
</foreignkeys>
<indexes>
<index name="fk_avm_sprop_qname" unique="false">
<columnnames>
<columnname>qname_id</columnname>
</columnnames>
</index>
<index name="fk_avm_sprop_store" unique="false">
<columnnames>
<columnname>avm_store_id</columnname>
</columnnames>
</index>
</indexes>
</table>
<table name="avm_stores">
<columns>
<column name="id" order="1">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="vers" order="2">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="name" order="3">
<type>varchar(255)</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="next_version_id" order="4">
<type>int4</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="current_root_id" order="5">
<type>int8</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="acl_id" order="6">
<type>int8</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="avm_stores_pkey">
<columnnames>
<columnname order="1">id</columnname>
</columnnames>
</primarykey>
<foreignkeys>
<foreignkey name="fk_avm_s_acl">
<localcolumn>acl_id</localcolumn>
<targettable>alf_access_control_list</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
<foreignkey name="fk_avm_s_root">
<localcolumn>current_root_id</localcolumn>
<targettable>avm_nodes</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
</foreignkeys>
<indexes>
<index name="avm_stores_name_key" unique="true">
<columnnames>
<columnname>name</columnname>
</columnnames>
</index>
<index name="fk_avm_s_acl" unique="false">
<columnnames>
<columnname>acl_id</columnname>
</columnnames>
</index>
<index name="fk_avm_s_root" unique="false">
<columnnames>
<columnname>current_root_id</columnname>
</columnnames>
</index>
</indexes>
</table>
<table name="avm_version_layered_node_entry">
<columns>
<column name="version_root_id" order="1">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="md5sum" order="2">
<type>varchar(32)</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="path" order="3">
<type>varchar(1024)</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="avm_version_layered_node_entry_pkey">
<columnnames>
<columnname order="1">version_root_id</columnname>
<columnname order="2">md5sum</columnname>
</columnnames>
</primarykey>
<foreignkeys>
<foreignkey name="fk_avm_vlne_vr">
<localcolumn>version_root_id</localcolumn>
<targettable>avm_version_roots</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
</foreignkeys>
<indexes>
<index name="fk_avm_vlne_vr" unique="false">
<columnnames>
<columnname>version_root_id</columnname>
</columnnames>
</index>
</indexes>
</table>
<table name="avm_version_roots">
<columns>
<column name="id" order="1">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="version_id" order="2">
<type>int4</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="avm_store_id" order="3">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="create_date" order="4">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="creator" order="5">
<type>varchar(255)</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="root_id" order="6">
<type>int8</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="tag" order="7">
<type>varchar(255)</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="description" order="8">
<type>varchar(1024)</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="avm_version_roots_pkey">
<columnnames>
<columnname order="1">id</columnname>
</columnnames>
</primarykey>
<foreignkeys>
<foreignkey name="fk_avm_vr_root">
<localcolumn>root_id</localcolumn>
<targettable>avm_nodes</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
<foreignkey name="fk_avm_vr_store">
<localcolumn>avm_store_id</localcolumn>
<targettable>avm_stores</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
</foreignkeys>
<indexes>
<index name="avm_version_roots_version_id_avm_store_id_key" unique="true">
<columnnames>
<columnname>version_id</columnname>
<columnname>avm_store_id</columnname>
</columnnames>
</index>
<index name="fk_avm_vr_root" unique="false">
<columnnames>
<columnname>root_id</columnname>
</columnnames>
</index>
<index name="fk_avm_vr_store" unique="false">
<columnnames>
<columnname>avm_store_id</columnname>
</columnnames>
</index>
<index name="idx_avm_vr_revuq" unique="false">
<columnnames>
<columnname>avm_store_id</columnname>
<columnname>version_id</columnname>
</columnnames>
</index>
<index name="idx_avm_vr_version" unique="false">
<columnnames>
<columnname>version_id</columnname>
</columnnames>
</index>
</indexes>
</table>
</objects>
</schema>