Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

78403: Merged EOL (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      75700: ACE-2149: EOL AVM / WCM
       - Remove most of the AVM and WCM beans, scripts, classes, patches, etc
       - The Explorer client is very broken for compilation
         - TODO: Remove all WCM-related functionality, which I thought would be best left to a UI dev
                 I've murdered many of the classes and beans but there's more to do
       - The repository compiles
         TODO: Get it running again
       - TODO: Check if we can wipe the 'deployment' project as well


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82540 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Erik Winlof
2014-09-03 12:01:49 +00:00
parent eaff240152
commit 0baa0f74f4
284 changed files with 206 additions and 58844 deletions

View File

@@ -1,248 +0,0 @@
--
-- Title: Create AVM tables
-- Database: MySQL InnoDB
-- Since: V3.2.0 Schema 3002
-- Author: janv
--
-- Please contact support@alfresco.com if you need assistance with the upgrade.
--
create table avm_aspects (
node_id bigint not null,
qname_id bigint not null,
primary key (node_id, qname_id)
) ENGINE=InnoDB;
create table avm_child_entries (
parent_id bigint not null,
lc_name varchar(160) not null,
name varchar(160) not null,
child_id bigint not null,
primary key (parent_id, lc_name)
) ENGINE=InnoDB;
create table avm_history_links (
ancestor bigint not null,
descendent bigint not null,
primary key (ancestor, descendent)
) ENGINE=InnoDB;
create table avm_merge_links (
mfrom bigint not null,
mto bigint not null,
primary key (mfrom, mto)
) ENGINE=InnoDB;
create table avm_node_properties (
node_id bigint not null,
actual_type_n integer not null,
persisted_type_n integer not null,
multi_valued bit not null,
boolean_value bit,
long_value bigint,
float_value float,
double_value double precision,
string_value text,
serializable_value blob,
qname_id bigint not null,
primary key (node_id, qname_id)
) ENGINE=InnoDB;
create table avm_nodes (
id bigint not null auto_increment,
class_type varchar(20) not null,
vers bigint not null,
version_id integer not null,
guid varchar(36),
creator varchar(255) not null,
owner varchar(255) not null,
lastModifier varchar(255) not null,
createDate bigint not null,
modDate bigint not null,
accessDate bigint not null,
is_root bit,
store_new_id bigint,
acl_id bigint,
deletedType integer,
layer_id bigint,
indirection text,
indirection_version integer,
primary_indirection bit,
opacity bit,
content_url varchar(128),
mime_type varchar(100),
encoding varchar(16),
length bigint,
primary key (id)
) ENGINE=InnoDB;
create table avm_store_properties (
id bigint not null auto_increment,
avm_store_id bigint,
qname_id bigint not null,
actual_type_n integer not null,
persisted_type_n integer not null,
multi_valued bit not null,
boolean_value bit,
long_value bigint,
float_value float,
double_value double precision,
string_value text,
serializable_value blob,
primary key (id)
) ENGINE=InnoDB;
create table avm_stores (
id bigint not null auto_increment,
vers bigint not null,
name varchar(255) unique,
next_version_id integer not null,
current_root_id bigint,
acl_id bigint,
primary key (id)
) ENGINE=InnoDB;
create table avm_version_layered_node_entry (
version_root_id bigint not null,
md5sum varchar(32) not null,
path text,
primary key (version_root_id, md5sum)
) ENGINE=InnoDB;
create table avm_version_roots (
id bigint not null auto_increment,
version_id integer not null,
avm_store_id bigint not null,
create_date bigint not null,
creator varchar(255) not null,
root_id bigint not null,
tag varchar(255),
description text,
primary key (id),
constraint unique index idx_avm_vr_uq (avm_store_id, version_id)
) ENGINE=InnoDB;
alter table avm_aspects
add index fk_avm_nasp_n (node_id),
add constraint fk_avm_nasp_n
foreign key (node_id)
references avm_nodes (id);
alter table avm_child_entries
add index fk_avm_ce_child (child_id),
add constraint fk_avm_ce_child
foreign key (child_id)
references avm_nodes (id);
alter table avm_child_entries
add index fk_avm_ce_parent (parent_id),
add constraint fk_avm_ce_parent
foreign key (parent_id)
references avm_nodes (id);
alter table avm_history_links
add index fk_avm_hl_desc (descendent),
add constraint fk_avm_hl_desc
foreign key (descendent)
references avm_nodes (id);
alter table avm_history_links
add index fk_avm_hl_ancestor (ancestor),
add constraint fk_avm_hl_ancestor
foreign key (ancestor)
references avm_nodes (id);
alter table avm_merge_links
add index fk_avm_ml_from (mfrom),
add constraint fk_avm_ml_from
foreign key (mfrom)
references avm_nodes (id);
alter table avm_merge_links
add index fk_avm_ml_to (mto),
add constraint fk_avm_ml_to
foreign key (mto)
references avm_nodes (id);
alter table avm_node_properties
add index fk_avm_nprop_n (node_id),
add constraint fk_avm_nprop_n
foreign key (node_id)
references avm_nodes (id);
create index idx_avm_n_pi on avm_nodes (primary_indirection);
alter table avm_nodes
add index fk_avm_n_acl (acl_id),
add constraint fk_avm_n_acl
foreign key (acl_id)
references alf_access_control_list (id);
alter table avm_nodes
add index fk_avm_n_store (store_new_id),
add constraint fk_avm_n_store
foreign key (store_new_id)
references avm_stores (id);
alter table avm_store_properties
add index fk_avm_sprop_store (avm_store_id),
add constraint fk_avm_sprop_store
foreign key (avm_store_id)
references avm_stores (id);
alter table avm_stores
add index fk_avm_s_root (current_root_id),
add constraint fk_avm_s_root
foreign key (current_root_id)
references avm_nodes (id);
alter table avm_stores
add index fk_avm_s_acl (acl_id),
add constraint fk_avm_s_acl
foreign key (acl_id)
references alf_access_control_list (id);
alter table avm_version_layered_node_entry
add index fk_avm_vlne_vr (version_root_id),
add constraint fk_avm_vlne_vr
foreign key (version_root_id)
references avm_version_roots (id);
create index idx_avm_vr_version on avm_version_roots (version_id);
alter table avm_version_roots
add index fk_avm_vr_store (avm_store_id),
add constraint fk_avm_vr_store
foreign key (avm_store_id)
references avm_stores (id);
alter table avm_version_roots
add index fk_avm_vr_root (root_id),
add constraint fk_avm_vr_root
foreign key (root_id)
references avm_nodes (id);
CREATE INDEX fk_avm_nasp_qn ON avm_aspects (qname_id);
ALTER TABLE avm_aspects ADD CONSTRAINT fk_avm_nasp_qn FOREIGN KEY (qname_id) REFERENCES alf_qname (id);
CREATE INDEX fk_avm_nprop_qn ON avm_node_properties (qname_id);
ALTER TABLE avm_node_properties ADD CONSTRAINT fk_avm_nprop_qn FOREIGN KEY (qname_id) REFERENCES alf_qname (id);
CREATE INDEX fk_avm_sprop_qname ON avm_store_properties (qname_id);
ALTER TABLE avm_store_properties ADD CONSTRAINT fk_avm_sprop_qname FOREIGN KEY (qname_id) REFERENCES alf_qname (id);
CREATE INDEX idx_avm_hl_revpk ON avm_history_links (descendent, ancestor);
CREATE INDEX idx_avm_ce_lc_name ON avm_child_entries (lc_name, parent_id);
--
-- Record script finish
--
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V3.2-AvmTables';
INSERT INTO alf_applied_patch
(id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
VALUES
(
'patch.db-V3.2-AvmTables', 'Manually executed script upgrade V3.2: AVM Tables',
0, 3001, -1, 3002, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
);

View File

@@ -1,742 +0,0 @@
<?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>
<table name="avm_aspects">
<columns>
<column name="node_id" order="1">
<type>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="qname_id" order="2">
<type>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="PRIMARY">
<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>bigint</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>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="PRIMARY">
<columnnames>
<columnname order="2">lc_name</columnname>
<columnname order="1">parent_id</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>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="descendent" order="2">
<type>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="PRIMARY">
<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_desc" unique="false">
<columnnames>
<columnname>descendent</columnname>
</columnnames>
</index>
<index name="fk_avm_hl_ancestor" unique="false">
<columnnames>
<columnname>ancestor</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>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="mto" order="2">
<type>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="PRIMARY">
<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>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="actual_type_n" order="2">
<type>int</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="persisted_type_n" order="3">
<type>int</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="multi_valued" order="4">
<type>bit</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="boolean_value" order="5">
<type>bit</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="long_value" order="6">
<type>bigint</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="float_value" order="7">
<type>float</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="double_value" order="8">
<type>double</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="string_value" order="9">
<type>text</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="serializable_value" order="10">
<type>blob</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="qname_id" order="11">
<type>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="PRIMARY">
<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>bigint</type>
<nullable>false</nullable>
<autoincrement>true</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>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="version_id" order="4">
<type>int</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>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="modDate" order="10">
<type>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="accessDate" order="11">
<type>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="is_root" order="12">
<type>bit</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="store_new_id" order="13">
<type>bigint</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="acl_id" order="14">
<type>bigint</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="deletedType" order="15">
<type>int</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="layer_id" order="16">
<type>bigint</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="indirection" order="17">
<type>text</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="indirection_version" order="18">
<type>int</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="primary_indirection" order="19">
<type>bit</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="opacity" order="20">
<type>bit</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>bigint</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="PRIMARY">
<columnnames>
<columnname order="1">id</columnname>
</columnnames>
</primarykey>
<foreignkeys>
<foreignkey name="fk_avm_n_store">
<localcolumn>store_new_id</localcolumn>
<targettable>avm_stores</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
<foreignkey name="fk_avm_n_acl">
<localcolumn>acl_id</localcolumn>
<targettable>alf_access_control_list</targettable>
<targetcolumn>id</targetcolumn>
</foreignkey>
</foreignkeys>
<indexes>
<index name="idx_avm_n_pi" unique="false">
<columnnames>
<columnname>primary_indirection</columnname>
</columnnames>
</index>
<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>
</indexes>
</table>
<table name="avm_store_properties">
<columns>
<column name="id" order="1">
<type>bigint</type>
<nullable>false</nullable>
<autoincrement>true</autoincrement>
</column>
<column name="avm_store_id" order="2">
<type>bigint</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="qname_id" order="3">
<type>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="actual_type_n" order="4">
<type>int</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="persisted_type_n" order="5">
<type>int</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="multi_valued" order="6">
<type>bit</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="boolean_value" order="7">
<type>bit</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="long_value" order="8">
<type>bigint</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="float_value" order="9">
<type>float</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="double_value" order="10">
<type>double</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="string_value" order="11">
<type>text</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="serializable_value" order="12">
<type>blob</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="PRIMARY">
<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_store" unique="false">
<columnnames>
<columnname>avm_store_id</columnname>
</columnnames>
</index>
<index name="fk_avm_sprop_qname" unique="false">
<columnnames>
<columnname>qname_id</columnname>
</columnnames>
</index>
</indexes>
</table>
<table name="avm_stores">
<columns>
<column name="id" order="1">
<type>bigint</type>
<nullable>false</nullable>
<autoincrement>true</autoincrement>
</column>
<column name="vers" order="2">
<type>bigint</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>int</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="current_root_id" order="5">
<type>bigint</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="acl_id" order="6">
<type>bigint</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="PRIMARY">
<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="name" unique="true">
<columnnames>
<columnname>name</columnname>
</columnnames>
</index>
<index name="fk_avm_s_root" unique="false">
<columnnames>
<columnname>current_root_id</columnname>
</columnnames>
</index>
<index name="fk_avm_s_acl" unique="false">
<columnnames>
<columnname>acl_id</columnname>
</columnnames>
</index>
</indexes>
</table>
<table name="avm_version_layered_node_entry">
<columns>
<column name="version_root_id" order="1">
<type>bigint</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>text</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="PRIMARY">
<columnnames>
<columnname order="2">md5sum</columnname>
<columnname order="1">version_root_id</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>bigint</type>
<nullable>false</nullable>
<autoincrement>true</autoincrement>
</column>
<column name="version_id" order="2">
<type>int</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="avm_store_id" order="3">
<type>bigint</type>
<nullable>false</nullable>
<autoincrement>false</autoincrement>
</column>
<column name="create_date" order="4">
<type>bigint</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>bigint</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>text</type>
<nullable>true</nullable>
<autoincrement>false</autoincrement>
</column>
</columns>
<primarykey name="PRIMARY">
<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="idx_avm_vr_version" unique="false">
<columnnames>
<columnname>version_id</columnname>
</columnnames>
</index>
<index name="fk_avm_vr_store" unique="false">
<columnnames>
<columnname>avm_store_id</columnname>
</columnnames>
</index>
<index name="fk_avm_vr_root" unique="false">
<columnnames>
<columnname>root_id</columnname>
</columnnames>
</index>
<index name="idx_avm_vr_uq" unique="true">
<columnnames>
<columnname>avm_store_id</columnname>
<columnname>version_id</columnname>
</columnnames>
</index>
</indexes>
</table>
</objects>
</schema>

View File

@@ -1,255 +0,0 @@
--
-- Title: Create AVM tables
-- Database: PostgreSql
-- Since: V3.2.0 Schema 3002
-- Author: Pavel Yurkevich
--
-- Please contact support@alfresco.com if you need assistance with the upgrade.
--
create table avm_aspects (
node_id INT8 not null,
qname_id INT8 not null,
primary key (node_id, qname_id)
);
create table avm_child_entries (
parent_id INT8 not null,
lc_name varchar(160) not null,
name varchar(160) not null,
child_id INT8 not null,
primary key (parent_id, lc_name)
);
create table avm_history_links (
ancestor INT8 not null,
descendent INT8 not null,
primary key (ancestor, descendent)
);
create table avm_merge_links (
mfrom INT8 not null,
mto INT8 not null,
primary key (mfrom, mto)
);
create table avm_node_properties (
node_id INT8 not null,
actual_type_n INT4 not null,
persisted_type_n INT4 not null,
multi_valued BOOL not null,
boolean_value BOOL,
long_value INT8,
float_value FLOAT4,
double_value FLOAT8,
string_value VARCHAR(1024),
serializable_value BYTEA,
qname_id INT8 not null,
primary key (node_id, qname_id)
);
create sequence avm_nodes_seq start with 1 increment by 1;
create table avm_nodes (
id INT8 not null,
class_type varchar(20) not null,
vers INT8 not null,
version_id INT4 not null,
guid varchar(36),
creator varchar(255) not null,
owner varchar(255) not null,
lastModifier varchar(255) not null,
createDate INT8 not null,
modDate INT8 not null,
accessDate INT8 not null,
is_root BOOL,
store_new_id INT8,
acl_id INT8,
deletedType INT4,
layer_id INT8,
indirection VARCHAR(1024),
indirection_version INT4,
primary_indirection BOOL,
opacity BOOL,
content_url varchar(128),
mime_type varchar(100),
encoding varchar(16),
length INT8,
primary key (id)
);
create sequence avm_store_properties_seq start with 1 increment by 1;
create table avm_store_properties (
id INT8 not null,
avm_store_id INT8,
qname_id INT8 not null,
actual_type_n INT4 not null,
persisted_type_n INT4 not null,
multi_valued BOOL not null,
boolean_value BOOL,
long_value INT8,
float_value FLOAT4,
double_value FLOAT8,
string_value VARCHAR(1024),
serializable_value BYTEA,
primary key (id)
);
create sequence avm_stores_seq start with 1 increment by 1;
create table avm_stores (
id INT8 not null,
vers INT8 not null,
name varchar(255) unique,
next_version_id INT4 not null,
current_root_id INT8,
acl_id INT8,
primary key (id)
);
create table avm_version_layered_node_entry (
version_root_id INT8 not null,
md5sum varchar(32) not null,
path VARCHAR(1024),
primary key (version_root_id, md5sum)
);
create sequence avm_version_roots_seq start with 1 increment by 1;
create table avm_version_roots (
id INT8 not null,
version_id INT4 not null,
avm_store_id INT8 not null,
create_date INT8 not null,
creator varchar(255) not null,
root_id INT8 not null,
tag varchar(255),
description VARCHAR(1024),
primary key (id)
);
alter table avm_version_roots
add constraint idx_avm_vr_uq
unique (avm_store_id, version_id);
alter table avm_aspects
add constraint fk_avm_nasp_n
foreign key (node_id)
references avm_nodes (id);
create index fk_avm_nasp_n on avm_aspects(node_id);
alter table avm_child_entries
add constraint fk_avm_ce_child
foreign key (child_id)
references avm_nodes (id);
create index fk_avm_ce_child on avm_child_entries(child_id);
alter table avm_child_entries
add constraint fk_avm_ce_parent
foreign key (parent_id)
references avm_nodes (id);
create index fk_avm_ce_parent on avm_child_entries(parent_id);
alter table avm_history_links
add constraint fk_avm_hl_desc
foreign key (descendent)
references avm_nodes (id);
create index fk_avm_hl_desc on avm_history_links(descendent);
alter table avm_history_links
add constraint fk_avm_hl_ancestor
foreign key (ancestor)
references avm_nodes (id);
create index fk_avm_hl_ancestor on avm_history_links(ancestor);
alter table avm_merge_links
add constraint fk_avm_ml_from
foreign key (mfrom)
references avm_nodes (id);
create index fk_avm_ml_from on avm_merge_links(mfrom);
alter table avm_merge_links
add constraint fk_avm_ml_to
foreign key (mto)
references avm_nodes (id);
create index fk_avm_ml_to on avm_merge_links(mto);
alter table avm_node_properties
add constraint fk_avm_nprop_n
foreign key (node_id)
references avm_nodes (id);
create index fk_avm_nprop_n on avm_node_properties(node_id);
create index idx_avm_n_pi on avm_nodes (primary_indirection);
alter table avm_nodes
add constraint fk_avm_n_acl
foreign key (acl_id)
references alf_access_control_list (id);
create index fk_avm_n_acl on avm_nodes(acl_id);
alter table avm_nodes
add constraint fk_avm_n_store
foreign key (store_new_id)
references avm_stores (id);
create index fk_avm_n_store on avm_nodes(store_new_id);
alter table avm_store_properties
add constraint fk_avm_sprop_store
foreign key (avm_store_id)
references avm_stores (id);
create index fk_avm_sprop_store on avm_store_properties(avm_store_id);
alter table avm_stores
add constraint fk_avm_s_root
foreign key (current_root_id)
references avm_nodes (id);
create index fk_avm_s_root on avm_stores(current_root_id);
alter table avm_stores
add constraint fk_avm_s_acl
foreign key (acl_id)
references alf_access_control_list (id);
create index fk_avm_s_acl on avm_stores(acl_id);
alter table avm_version_layered_node_entry
add constraint fk_avm_vlne_vr
foreign key (version_root_id)
references avm_version_roots (id);
create index fk_avm_vlne_vr on avm_version_layered_node_entry(version_root_id);
create index idx_avm_vr_version on avm_version_roots (version_id);
alter table avm_version_roots
add constraint fk_avm_vr_store
foreign key (avm_store_id)
references avm_stores (id);
create index fk_avm_vr_store on avm_version_roots(avm_store_id);
alter table avm_version_roots
add constraint fk_avm_vr_root
foreign key (root_id)
references avm_nodes (id);
create index fk_avm_vr_root on avm_version_roots(root_id);
CREATE INDEX fk_avm_nasp_qn ON avm_aspects (qname_id);
ALTER TABLE avm_aspects ADD CONSTRAINT fk_avm_nasp_qn FOREIGN KEY (qname_id) REFERENCES alf_qname (id);
CREATE INDEX fk_avm_nprop_qn ON avm_node_properties (qname_id);
ALTER TABLE avm_node_properties ADD CONSTRAINT fk_avm_nprop_qn FOREIGN KEY (qname_id) REFERENCES alf_qname (id);
CREATE INDEX fk_avm_sprop_qname ON avm_store_properties (qname_id);
ALTER TABLE avm_store_properties ADD CONSTRAINT fk_avm_sprop_qname FOREIGN KEY (qname_id) REFERENCES alf_qname (id);
CREATE INDEX idx_avm_hl_revpk ON avm_history_links (descendent, ancestor);
CREATE INDEX idx_avm_ce_lc_name ON avm_child_entries (lc_name, parent_id);
--
-- Record script finish
--
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V3.2-AvmTables';
INSERT INTO alf_applied_patch
(id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
VALUES
(
'patch.db-V3.2-AvmTables', 'Manually executed script upgrade V3.2: AVM Tables',
0, 3001, -1, 3002, null, 'UNKOWN', TRUE, TRUE, 'Script completed'
);

View File

@@ -1,753 +0,0 @@
<?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">
<validators>
<validator class="org.alfresco.util.schemacomp.validator.NameValidator">
<properties>
<property name="pattern">.*</property>
</properties>
</validator>
</validators>
<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="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_uq" unique="true">
<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>