mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
17574: Merged in DEV work for ContentStoreCleaner: ETHREEOH-2813 17432: Build up for fix of ETHREEOH-2813: ContentStoreCleaner doesn't scale 17546: ContentStoreCleaner fixes and further tests 17524: Unit tests and bulk queries for orphaned content 17506: W.I.P. for content cleaner for V3.2: ETHREEOH-2813 17575: Missed check-in (other DB create scripts look OK) 17577: Re-activated 'contentStoreCleanerTrigger' - Added system property: system.content.orphanCleanup.cronExpression=0 0 4 * * ? - Other useful properties: system.content.eagerOrphanCleanup=false system.content.orphanProtectDays=14 17578: Fixed MT test and sample contexts after recent content cleaner changes 17579: Fixed DB2 unique index creation for content URLs 17580: First pass at fix for ETHREEOH-3454: Port enterprise upgrade scripts for ContentStoreCleaner changes ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.2:r17574-17575,17577-17580 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18151 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
69 lines
2.3 KiB
SQL
69 lines
2.3 KiB
SQL
--
|
|
-- Title: Create Content tables
|
|
-- Database: MySQL InnoDB
|
|
-- Since: V3.2 Schema 2012
|
|
-- Author: Derek Hulley
|
|
--
|
|
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
|
--
|
|
|
|
CREATE TABLE alf_mimetype
|
|
(
|
|
id BIGINT NOT NULL AUTO_INCREMENT,
|
|
version BIGINT NOT NULL,
|
|
mimetype_str VARCHAR(100) NOT NULL,
|
|
PRIMARY KEY (id),
|
|
UNIQUE (mimetype_str)
|
|
) ENGINE=InnoDB;
|
|
|
|
CREATE TABLE alf_encoding
|
|
(
|
|
id BIGINT NOT NULL AUTO_INCREMENT,
|
|
version BIGINT NOT NULL,
|
|
encoding_str VARCHAR(100) NOT NULL,
|
|
PRIMARY KEY (id),
|
|
UNIQUE (encoding_str)
|
|
) ENGINE=InnoDB;
|
|
|
|
-- This table may exist during upgrades, but must be removed.
|
|
-- The drop statement is therefore optional.
|
|
DROP TABLE alf_content_url; --(optional)
|
|
CREATE TABLE alf_content_url
|
|
(
|
|
id BIGINT NOT NULL AUTO_INCREMENT,
|
|
content_url VARCHAR(255) NOT NULL,
|
|
content_url_short VARCHAR(12) NOT NULL,
|
|
content_url_crc BIGINT NOT NULL,
|
|
content_size BIGINT NOT NULL,
|
|
orphan_time BIGINT NULL,
|
|
UNIQUE INDEX idx_alf_conturl_cr (content_url_short, content_url_crc),
|
|
INDEX idx_alf_conturl_ot (orphan_time),
|
|
PRIMARY KEY (id)
|
|
) ENGINE=InnoDB;
|
|
|
|
CREATE TABLE alf_content_data
|
|
(
|
|
id BIGINT NOT NULL AUTO_INCREMENT,
|
|
version BIGINT NOT NULL,
|
|
content_url_id BIGINT NULL,
|
|
content_mimetype_id BIGINT NULL,
|
|
content_encoding_id BIGINT NULL,
|
|
content_locale_id BIGINT NULL,
|
|
CONSTRAINT fk_alf_cont_url FOREIGN KEY (content_url_id) REFERENCES alf_content_url (id),
|
|
CONSTRAINT fk_alf_cont_mim FOREIGN KEY (content_mimetype_id) REFERENCES alf_mimetype (id),
|
|
CONSTRAINT fk_alf_cont_enc FOREIGN KEY (content_encoding_id) REFERENCES alf_encoding (id),
|
|
CONSTRAINT fk_alf_cont_loc FOREIGN KEY (content_locale_id) REFERENCES alf_locale (id),
|
|
PRIMARY KEY (id)
|
|
) ENGINE=InnoDB;
|
|
|
|
--
|
|
-- Record script finish
|
|
--
|
|
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V3.2-ContentTables';
|
|
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-ContentTables', 'Manually executed script upgrade V3.2: Content Tables',
|
|
0, 2011, -1, 2012, null, 'UNKOWN', 1, 1, 'Script completed'
|
|
); |