Files
alfresco-community-repo/config/alfresco/dbscripts/create/org.hibernate.dialect.PostgreSQLDialect/AlfrescoCreate-ActivityTables.sql
Derek Hulley 9cc9e975ff Merged V3.4 to HEAD (SQL-level fixes)
23368: Merged V3.3-BUG-FIX to V3.4
      23363: Merged V3.3 to V3.3-BUG-FIX
         23358: (RECORD ONLY) Removed redundant svn:mergeinfo
         23359: Minor I18N fix on patch.updateMimetypes2
         23360: Fixed ALF-3167: Websphere/Db2 SchemaBootstrap.dumpSchema is failing due to result set is closed error
                - SchemaDump uses nested resultset reads, which is incompatible with SchemaBootstrap's auto-commit connection
                - Also pull back some changes to fix MySQL builds after MySQL upgrades
         23361: More patch I18N
         23362: Merged V3.2 to V3.3
            23333: Fixed ALF-5396: Missing FK indexes on non-MySQL databases
            23324: Fixed ALF-5396: Missing FK indexes on non-MySQL databases
            - Create scripts were manually ported and required full clean-install testing in addition to upgrade testing
   23372: Fixed ALF-5421: update_ChildAssocsIndex ibatis statement does not include child_node_id
   23523: Merged BRANCHES/DEV/V3.3-BUG-FIX to BRANCHES/V3.4:
      23490: Merged BRANCHES/V3.3 to BRANCHES/DEV/V3.3-BUG-FIX:
         23470: Merged V3.2 to V3.3
            23395: Merged BRANCHES/DEV/BELARUS/HEAD_2010_09_21 to V32
               22821: ALF-4203: WCM 2.2.7 case-sensitivity causes errors after upgrade to 3.2.x.
               23055: ALF-4203: WCM 2.2.7 case-sensitivity causes errors after upgrade to 3.2.x (record-only, used only part of this checkin).
               23198: ALF-4203: WCM 2.2.7 case-sensitivity causes errors after upgrade to 3.2.x.
            23398: ALF-4203: fix for "WCM 2.2.7 case-senstivity causes err rs after upgrade to 3.2.x"
                   - updated template for patch.eliminateDuplicates
            23433: Fix for ALF-4203: "WCM 2.2.7 case-sensitivity causes errors after upgrade to 3.2.x"
                   - revised fix
   23752: Fixed ALF-5453: Remove old Audit tables from schema create scripts
   23957: Fixed ALF-5308: SQL error when changing name for record / folder with dispostion schedule applied
   24250: Fix typo in original fix of ALF-5308 and add unit test
   24345: Merged V3.3 to V3.4
      24337: Fixed ALF-6078: WCM: alf_lock table version number fails during roll-over.
             - Added specific, minor fixes for 3.4
   24352: Fix SQL fallout from ALF-6078


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@24354 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-12-09 01:32:16 +00:00

73 lines
2.5 KiB
SQL

--
-- Title: Activity tables
-- Database: PostgreSQL
-- Since: V3.0 Schema 126
-- Author: janv
--
-- Please contact support@alfresco.com if you need assistance with the upgrade.
--
CREATE SEQUENCE alf_activity_feed_seq START WITH 1 INCREMENT BY 1;
CREATE TABLE alf_activity_feed
(
id INT8 NOT NULL,
post_id INT8,
post_date TIMESTAMP NOT NULL,
activity_summary VARCHAR(1024),
feed_user_id VARCHAR(255),
activity_type VARCHAR(255) NOT NULL,
activity_format VARCHAR(10),
site_network VARCHAR(255),
app_tool VARCHAR(36),
post_user_id VARCHAR(255) NOT NULL,
feed_date TIMESTAMP NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX feed_postdate_idx ON alf_activity_feed (post_date);
CREATE INDEX feed_postuserid_idx ON alf_activity_feed (post_user_id);
CREATE INDEX feed_feeduserid_idx ON alf_activity_feed (feed_user_id);
CREATE INDEX feed_sitenetwork_idx ON alf_activity_feed (site_network);
CREATE INDEX feed_activityformat_idx ON alf_activity_feed (activity_format);
CREATE SEQUENCE alf_activity_feed_control_seq START WITH 1 INCREMENT BY 1;
CREATE TABLE alf_activity_feed_control
(
id INT8 NOT NULL,
feed_user_id VARCHAR(255) NOT NULL,
site_network VARCHAR(255),
app_tool VARCHAR(36),
last_modified TIMESTAMP NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX feedctrl_feeduserid_idx ON alf_activity_feed_control (feed_user_id);
CREATE SEQUENCE alf_activity_post_seq START WITH 1 INCREMENT BY 1;
CREATE TABLE alf_activity_post
(
sequence_id INT8 NOT NULL,
post_date TIMESTAMP NOT NULL,
status VARCHAR(10) NOT NULL,
activity_data VARCHAR(1024) NOT NULL,
post_user_id VARCHAR(255) NOT NULL,
job_task_node INT4 NOT NULL,
site_network VARCHAR(255),
app_tool VARCHAR(36),
activity_type VARCHAR(255) NOT NULL,
last_modified TIMESTAMP NOT NULL,
PRIMARY KEY (sequence_id)
);
CREATE INDEX post_jobtasknode_idx ON alf_activity_post (job_task_node);
CREATE INDEX post_status_idx ON alf_activity_post (status);
--
-- Record script finish
--
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V3.0-ActivityTables';
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.0-ActivityTables', 'Manually executed script upgrade V3.0: Activity Tables',
0, 125, -1, 126, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
);