Project

General

Profile

1
/*
2
 * Include any identifier rows that may have been missed during replication
3
 * Previous 2.0.x versions were unable to make a guid-docid mapping when the 
4
 * source replication partner did not provide SystemMetadata. 
5
 * v2.0.4 fixes this short coming, but we need to make sure we have all the mappings.
6
 */
7

    
8
INSERT INTO identifier (docid, rev, guid) 
9
	SELECT docid, rev, docid || '.' || rev 
10
	FROM xml_documents x
11
	WHERE NOT EXISTS (SELECT guid FROM identifier i WHERE x.docid = i.docid AND x.rev = i.rev)
12
	UNION	
13
	SELECT docid, rev, docid || '.' || rev 
14
	FROM xml_revisions x
15
	WHERE NOT EXISTS (SELECT guid FROM identifier i WHERE x.docid = i.docid AND x.rev = i.rev);
16

    
17
/*
18
 * update the database version
19
 */
20
UPDATE db_version SET status=0;
21

    
22
INSERT INTO db_version (version, status, date_created) 
23
  VALUES ('2.0.4', 1, CURRENT_DATE);
(62-62/77)