mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
33858: Fix for ALF-12674 CMIS LOWER fails with SOLR - also fixed ranges - UPPER/LOWER only matches upper/lower case - they were doing a generic match 33859: GERMAN: L10N updates based on EN rev 33523. Fixes: - ALF-12510, ALF-12498, ALF-12496 - ALF-12495, ALF-12483, ALF-12477 - ALF-12472, ALF-12471, ALF-12470 33860: FRENCH: L10N updates based on EN rev 33523. Fixes: - ALF-12510, ALF-12498, ALF-12496 - ALF-12495, ALF-12483, ALF-12477 - ALF-12472, ALF-12471, ALF-12470 33861: JAPANESE: L10N updates based on EN rev 33523. Fixes: - ALF-12510, ALF-12498, ALF-12496 - ALF-12495, ALF-12483, ALF-12477 - ALF-12472, ALF-12471, ALF-12470 33862: DUTCH: L10N updates based on EN rev 33523. Fixes: - ALF-12510, ALF-12498, ALF-12496 - ALF-12495, ALF-12483, ALF-12477 - ALF-12472, ALF-12471, ALF-12470 33892: ALF-11746 Tweak mimetype description sorting to be explicitly by description, case insensitive 33897: Fix for ALF-12789 XAM clean JOB fails with SOLR search - HTTPClient as used by SOLR now includes connection stale check 33902: Changed FileInfo to use flags value for pseudo file and delete on close, so values are copied by copyFrom(). 33904: Fixes: ALF-12794; Unescaped content error in delete event dialogue. 33910: ALF-12701: Ensure that all action labels are encoded to prevent XSS attacks 33913: Strip oplock request bits for pseudo files in the NTCreateAndX CIFS processing, so oplocks never granted to pseudo files. 33920: A better fix for ALF-12794. 33929: Merged V3.4-BUG-FIX to V4.0-BUG-FIX 33871: ALF-12557: WCM - Webform file picker path doesn't take account of the current Webapp - Fix by Pavel 33901: ALF-12815: Not possible to set versionType property when adding the aspect through nodeService.addAspect 33909: Fix for NFS 'node does not exist' error when editing using vi. ALF-12712. 33911: Merged V3.4 to V3.4-BUG-FIX 33867: ALF-9899: Site creation time was still increasing linearly due to avm_child_entries queries not being able to use an index - Added new lc_name column - lower case version of the name which can be included in the primary key and queries - Added DB upgrade scripts 33870: ALF-9899: Fixed indexing performance regression (e.g. during creation of 60,000 sites) - Apply more scoped cache invalidation for properties and aspects of a node in the current transaction, in line with parent associations - E.g. if I am querying aspects on a node already given a new parent association in the current transaction, there is no need to invalidate the parent assocs again when I find the aspects out of date! - This plus previous checkin means create site through Share UI back to 1 second (rather than 1 minute) with 30,000 sites 33914: Merged V3.4 to V3.4-BUG-FIX 33872: Merged V3.4-BUG-FIX to V3.4 33843: Fix for ALF-12775 33895: ALF-12816: Merged V4.0-BUG-FIX to 3.4 33357: When installing a module the tool reads the war's version.properties file and will not install if the war version is outside the repoVersionMin or repoVersionMax 33900: MMT fix: When the war has no version.properties file (e.g. share) it does not error. Added a test case and empty.war 33915: Merged V3.4 to V3.4-BUG-FIX (RECORD ONLY) 33462: Merged V3.4-BUG-FIX to V3.4 (3.4.8) 33896: ALF-9899: Reversed revisions 33867 and 33870 and rescheduled for 3.4 HF git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@33931 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
250 lines
8.1 KiB
SQL
250 lines
8.1 KiB
SQL
--
|
|
-- 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),
|
|
unique (version_id, avm_store_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_vr_revuq ON avm_version_roots (avm_store_id, version_id);
|
|
|
|
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'
|
|
); |