Index: openacs-4/packages/acs-lang/sql/postgresql/upgrade/upgrade-5.0.0b4-5.0.0b5.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/sql/postgresql/upgrade/upgrade-5.0.0b4-5.0.0b5.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-lang/sql/postgresql/upgrade/upgrade-5.0.0b4-5.0.0b5.sql 26 Jan 2004 15:39:45 -0000 1.3 +++ openacs-4/packages/acs-lang/sql/postgresql/upgrade/upgrade-5.0.0b4-5.0.0b5.sql 26 Feb 2004 15:28:45 -0000 1.4 @@ -29,29 +29,5 @@ -- Missing this primary key made some queries below very slow alter table lang_messages_audit add constraint lang_messages_audit_pk primary key (package_key, message_key, locale, overwrite_date); --- Make sure sync_time is not null for the first message imported. If we don't --- do this we are missing a set of base messages to merge against on the next --- catalog import. --- Messages with only one revision - --- Messages with only one revision --- This query is slow. Not sure how to speed it up. -update lang_messages - set sync_time = current_timestamp - where not exists (select 1 - from lang_messages_audit lma - where lma.package_key = lang_messages.package_key - and lma.message_key = lang_messages.message_key - and lma.locale = lang_messages.locale - ); - --- Messages with multiple revisions --- This query is slow as well. - update lang_messages_audit - set sync_time = current_timestamp - where overwrite_date = (select max(lma2.overwrite_date) - from lang_messages_audit lma2 - where lma2.package_key = lang_messages_audit.package_key - and lma2.message_key = lang_messages_audit.message_key - and lma2.locale = lang_messages_audit.locale - ); +-- We have to leave sync_time null since we don't know when the messages in the db were last in sync +-- with the catalog files