Index: lib/metacat.properties
===================================================================
--- lib/metacat.properties	(revision 7391)
+++ lib/metacat.properties	(revision 7392)
@@ -22,7 +22,7 @@
 ############### Application Values ############
 
 ## one of the few places where we use ANT tokens
-application.metacatVersion=2.0.4
+application.metacatVersion=2.0.5
 application.metacatReleaseInfo=-1
 
 application.deployDir=
@@ -76,6 +76,7 @@
 database.upgradeVersion.2.0.2=upgrade-db-to-2.0.2
 database.upgradeVersion.2.0.3=upgrade-db-to-2.0.3
 database.upgradeVersion.2.0.4=upgrade-db-to-2.0.4
+database.upgradeVersion.2.0.5=upgrade-db-to-2.0.5
 ## for running java-based utilities
 database.upgradeUtility.1.5.0=edu.ucsb.nceas.metacat.admin.upgrade.Upgrade1_5_0
 database.upgradeUtility.2.0.0=edu.ucsb.nceas.metacat.admin.upgrade.Upgrade2_0_0
Index: src/upgrade-db-to-2.0.0-oracle.sql
===================================================================
--- src/upgrade-db-to-2.0.0-oracle.sql	(revision 7391)
+++ src/upgrade-db-to-2.0.0-oracle.sql	(revision 7392)
@@ -20,20 +20,20 @@
 		PRIMARY KEY (guid)
 )
 
-CREATE TABLE systemMetadataReplicationPolicy (
+CREATE TABLE smReplicationPolicy (
 	guid VARCHAR2(2000),	-- the globally unique string identifier of the object that the system metadata describes
 	member_node VARCHAR(250),	 -- replication member node
 	policy VARCHAR2(2000),	 -- the policy (preferred, blocked, etc...TBD)
-	CONSTRAINT systemMetadataReplicationPolicy_fk 
+	CONSTRAINT smReplicationPolicy_fk 
 		FOREIGN KEY (guid) REFERENCES systemMetadata DEFERRABLE
 );
 
-CREATE TABLE systemMetadataReplicationStatus (
+CREATE TABLE smReplicationStatus (
 	guid VARCHAR2(2000),	-- the globally unique string identifier of the object that the system metadata describes
 	member_node VARCHAR(250),	 -- replication member node
 	status VARCHAR(250),	 -- replication status
 	date_verified DATE, 	-- the date replication was verified   
-	CONSTRAINT systemMetadataReplicationStatus_fk 
+	CONSTRAINT smReplicationStatus_fk 
 		FOREIGN KEY (guid) REFERENCES systemMetadata DEFERRABLE
 );
 
Index: src/xmltables-oracle.sql
===================================================================
--- src/xmltables-oracle.sql	(revision 7391)
+++ src/xmltables-oracle.sql	(revision 7392)
@@ -422,20 +422,20 @@
 		PRIMARY KEY (guid)
 )
 
-CREATE TABLE systemMetadataReplicationPolicy (
+CREATE TABLE smReplicationPolicy (
 	guid VARCHAR2(2000),	-- the globally unique string identifier of the object that the system metadata describes
 	member_node VARCHAR(250),	 -- replication member node
 	policy VARCHAR2(2000),	 -- the policy (preferred, blocked, etc...TBD)
-	CONSTRAINT systemMetadataReplicationPolicy_fk 
+	CONSTRAINT smReplicationPolicy_fk 
 		FOREIGN KEY (guid) REFERENCES systemMetadata DEFERRABLE
 );
 
-CREATE TABLE systemMetadataReplicationStatus (
+CREATE TABLE smReplicationStatus (
 	guid VARCHAR2(2000),	-- the globally unique string identifier of the object that the system metadata describes
 	member_node VARCHAR(250),	 -- replication member node
 	status VARCHAR(250),	 -- replication status
 	date_verified DATE, 	-- the date replication was verified   
-	CONSTRAINT systemMetadataReplicationStatus_fk 
+	CONSTRAINT smReplicationStatus_fk 
 		FOREIGN KEY (guid) REFERENCES systemMetadata DEFERRABLE
 );
 
Index: src/xmltables-postgres.sql
===================================================================
--- src/xmltables-postgres.sql	(revision 7391)
+++ src/xmltables-postgres.sql	(revision 7392)
@@ -319,20 +319,20 @@
  */
 
 
-CREATE TABLE systemMetadataReplicationPolicy (
+CREATE TABLE smReplicationPolicy (
 	guid text,	-- the globally unique string identifier of the object that the system metadata describes
 	member_node VARCHAR(250),	 -- replication member node
 	policy text,	 -- the policy (preferred, blocked, etc...TBD)
-	CONSTRAINT systemMetadataReplicationPolicy_fk 
+	CONSTRAINT smReplicationPolicy_fk 
 		FOREIGN KEY (guid) REFERENCES systemMetadata DEFERRABLE
 );
 
-CREATE TABLE systemMetadataReplicationStatus (
+CREATE TABLE smReplicationStatus (
 	guid text,	-- the globally unique string identifier of the object that the system metadata describes
 	member_node VARCHAR(250),	 -- replication member node
 	status VARCHAR(250),	 -- replication status
 	date_verified TIMESTAMP, 	-- the date replication was verified   
-	CONSTRAINT systemMetadataReplicationStatus_fk 
+	CONSTRAINT smReplicationStatus_fk 
 		FOREIGN KEY (guid) REFERENCES systemMetadata DEFERRABLE
 );
 
Index: src/upgrade-db-to-2.0.5-postgres.sql
===================================================================
--- src/upgrade-db-to-2.0.5-postgres.sql	(nonexistent)
+++ src/upgrade-db-to-2.0.5-postgres.sql	(revision 7392)
@@ -0,0 +1,13 @@
+/*
+ * Alter the systemmetadata* table names for Oracle length restrictions
+ */
+ALTER TABLE systemMetadataReplicationPolicy RENAME TO smReplicationPolicy;
+ALTER TABLE systemMetadataReplicationStatus RENAME TO smReplicationStatus;
+
+/*
+ * update the database version
+ */
+UPDATE db_version SET status=0;
+
+INSERT INTO db_version (version, status, date_created) 
+  VALUES ('2.0.5', 1, CURRENT_DATE);
\ No newline at end of file

Property changes on: src/upgrade-db-to-2.0.5-postgres.sql
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: src/upgrade-db-to-2.0.5-oracle.sql
===================================================================
--- src/upgrade-db-to-2.0.5-oracle.sql	(nonexistent)
+++ src/upgrade-db-to-2.0.5-oracle.sql	(revision 7392)
@@ -0,0 +1,16 @@
+/*
+ * Alter the systemmetadata* table names for Oracle length restrictions
+ * NOTE: we cannot actually perform this since the tables could 
+ * never be created when 2.0.0 was first released. Oracle users of Metacat 1.x
+ * will have run through an updated 2.0.0 script that creates the correct table names
+ * for use in 2.0.5. So, we do nothing here for Oracle deployments.
+ */
+
+
+/*
+ * update the database version
+ */
+UPDATE db_version SET status=0;
+
+INSERT INTO db_version (version, status, date_created) 
+  VALUES ('2.0.5', 1, CURRENT_DATE);

Property changes on: src/upgrade-db-to-2.0.5-oracle.sql
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: src/edu/ucsb/nceas/metacat/admin/upgrade/GenerateGlobalIdentifiers.java
===================================================================
--- src/edu/ucsb/nceas/metacat/admin/upgrade/GenerateGlobalIdentifiers.java	(revision 7391)
+++ src/edu/ucsb/nceas/metacat/admin/upgrade/GenerateGlobalIdentifiers.java	(revision 7392)
@@ -57,6 +57,11 @@
  * xml_replication, then only convert the IDs for server 1 to GUIDs if the
  * property 'guid.ezid.doishoulder.1' defines a valid doi shoulder.
  * 
+ * NOTE: Metacat v2.0.5 has changed the name of the systemmetadata* tables to accommodate Oracle
+ * length restrictions. The table names have been updated in this utility to enable
+ * users to run this utility on v2.0.5+. You can only run this version of the utility on 
+ * Metacat deployments that have been upgraded to 2.0.5+
+ * 
  * @author jones
  */
 public class GenerateGlobalIdentifiers implements UpgradeUtilityInterface {
@@ -153,12 +158,12 @@
         // Convert other tables once, after the identifier table conversion has established the new
         // global identifiers to be used
         // This incudes: xml_access table, including accessfileid field, systemmetadata, 
-        // systemmetadatareplicationpolicy,and systemmetadatareplicationstatus tables
+        // smreplicationpolicy,and smreplicationstatus tables
         convertIdentifierField(con, "xml_access", "guid");
         convertIdentifierField(con, "xml_access", "accessfileid");
         convertIdentifierField(con, "systemmetadata", "guid");
-        convertIdentifierField(con, "systemmetadatareplicationpolicy", "guid");
-        convertIdentifierField(con, "systemmetadatareplicationstatus", "guid");
+        convertIdentifierField(con, "smreplicationpolicy", "guid");
+        convertIdentifierField(con, "smreplicationstatus", "guid");
 
         // Now clean up the temporary column we created, but note this makes it much
         // harder to revert our changes
@@ -169,8 +174,8 @@
         /*      
         // The following SQL commands will revert the changes made by this script as long as the identifier.old_guid column is intact
         start transaction;
-        update systemmetadatareplicationstatus set guid = id.old_guid FROM identifier id WHERE systemmetadatareplicationstatus.guid = id.guid;
-        update systemmetadatareplicationpolicy set guid = id.old_guid FROM identifier id WHERE systemmetadatareplicationpolicy.guid = id.guid;
+        update smreplicationstatus set guid = id.old_guid FROM identifier id WHERE smreplicationstatus.guid = id.guid;
+        update smreplicationpolicy set guid = id.old_guid FROM identifier id WHERE smreplicationpolicy.guid = id.guid;
         update systemmetadata set guid = id.old_guid FROM identifier id WHERE systemmetadata.guid = id.guid;
         update xml_access set accessfileid = id.old_guid FROM identifier id WHERE xml_access.accessfileid = id.guid;
         update xml_access set guid = id.old_guid FROM identifier id WHERE xml_access.guid = id.guid;
Index: src/edu/ucsb/nceas/metacat/IdentifierManager.java
===================================================================
--- src/edu/ucsb/nceas/metacat/IdentifierManager.java	(revision 7391)
+++ src/edu/ucsb/nceas/metacat/IdentifierManager.java	(revision 7392)
@@ -382,7 +382,7 @@
 		
 		List<NodeReference> nodes = new ArrayList<NodeReference>();
 		String sql = "select guid, policy, member_node " +
-			"from systemMetadataReplicationPolicy where guid = ? and policy = ?";
+			"from smReplicationPolicy where guid = ? and policy = ?";
 	    DBConnection dbConn = null;
 	    int serialNumber = -1;
 	    try {
@@ -420,7 +420,7 @@
 		
 		List<Replica> replicas = new ArrayList<Replica>();
 		String sql = "select guid, member_node, status, date_verified " +
-			"from systemMetadataReplicationStatus where guid = ?";
+			"from smReplicationStatus where guid = ?";
 	    DBConnection dbConn = null;
 	    int serialNumber = -1;
 	    try {
@@ -1092,7 +1092,7 @@
     {
            
         // remove existing values first
-        String delete = "delete from systemMetadataReplicationPolicy " + 
+        String delete = "delete from smReplicationPolicy " + 
         "where guid = ? and policy = ?";
         PreparedStatement stmt = dbConn.prepareStatement(delete);
         //data values
@@ -1104,7 +1104,7 @@
         
         for (String memberNode: memberNodes) {
             // Execute the insert statement
-            String insert = "insert into systemMetadataReplicationPolicy " + 
+            String insert = "insert into smReplicationPolicy " + 
                 "(guid, policy, member_node) " +
                 "values (?, ?, ?)";
             PreparedStatement insertStatement = dbConn.prepareStatement(insert);
@@ -1114,7 +1114,7 @@
             insertStatement.setString(2, policy);
             insertStatement.setString(3, memberNode);
             
-            logMetacat.debug("systemMetadataReplicationPolicy sql: " + insertStatement.toString());
+            logMetacat.debug("smReplicationPolicy sql: " + insertStatement.toString());
 
             //execute
             int rows = insertStatement.executeUpdate();
@@ -1126,7 +1126,7 @@
     private void insertReplicationStatus(String guid, List<Replica> replicas, DBConnection dbConn) throws SQLException {
        
         // remove existing values first
-        String delete = "delete from systemMetadataReplicationStatus " + 
+        String delete = "delete from smReplicationStatus " + 
         "where guid = ?";
         PreparedStatement stmt = dbConn.prepareStatement(delete);
         //data values
@@ -1138,7 +1138,7 @@
         if (replicas != null) {
             for (Replica replica: replicas) {
 	            // Execute the insert statement
-	            String insert = "insert into systemMetadataReplicationStatus " + 
+	            String insert = "insert into smReplicationStatus " + 
 	                "(guid, member_node, status, date_verified) " +
 	                "values (?, ?, ?, ?)";
 	            PreparedStatement insertStatement = dbConn.prepareStatement(insert);
@@ -1152,7 +1152,7 @@
 	            insertStatement.setString(3, status);
 	            insertStatement.setDate(4, sqlDate);
 
-	            logMetacat.debug("systemMetadataReplicationStatus sql: " + insertStatement.toString());
+	            logMetacat.debug("smReplicationStatus sql: " + insertStatement.toString());
 	            
 	            //execute
 	            int rows = insertStatement.executeUpdate();
@@ -1735,21 +1735,21 @@
             rows = stmt.executeUpdate();
             stmt.close();
             
-            // remove the systemMetadataReplicationPolicy
-            query = "delete from systemMetadataReplicationPolicy " + 
+            // remove the smReplicationPolicy
+            query = "delete from smReplicationPolicy " + 
             "where guid = ?";
             stmt = dbConn.prepareStatement(query);
             stmt.setString(1, guid);
-            logMetacat.debug("delete systemMetadataReplicationPolicy: " + stmt.toString());
+            logMetacat.debug("delete smReplicationPolicy: " + stmt.toString());
             rows = stmt.executeUpdate();
             stmt.close();
             
-            // remove the systemMetadataReplicationStatus
-            query = "delete from systemMetadataReplicationStatus " + 
+            // remove the smReplicationStatus
+            query = "delete from smReplicationStatus " + 
             "where guid = ?";
             stmt = dbConn.prepareStatement(query);
             stmt.setString(1, guid);
-            logMetacat.debug("delete systemMetadataReplicationStatus: " + stmt.toString());
+            logMetacat.debug("delete smReplicationStatus: " + stmt.toString());
             rows = stmt.executeUpdate();
             stmt.close();
             
Index: src/delete_all_by_pid.sql
===================================================================
--- src/delete_all_by_pid.sql	(revision 7391)
+++ src/delete_all_by_pid.sql	(revision 7392)
@@ -65,13 +65,13 @@
 
 	-- do we want to remove the SM records too?
 	IF deleteSystemMetadata THEN
-		DELETE FROM systemMetadataReplicationPolicy WHERE guid = pid;
+		DELETE FROM smReplicationPolicy WHERE guid = pid;
 		GET DIAGNOSTICS deleted_count = ROW_COUNT;
-		RAISE NOTICE 'Deleted % rows from systemMetadataReplicationPolicy', deleted_count;
+		RAISE NOTICE 'Deleted % rows from smReplicationPolicy', deleted_count;
 		
-		DELETE FROM systemMetadataReplicationStatus WHERE guid = pid;
+		DELETE FROM smReplicationStatus WHERE guid = pid;
 		GET DIAGNOSTICS deleted_count = ROW_COUNT;
-		RAISE NOTICE 'Deleted % rows from systemMetadataReplicationStatus', deleted_count;
+		RAISE NOTICE 'Deleted % rows from smReplicationStatus', deleted_count;
 		
 		DELETE FROM systemMetadata WHERE guid = pid;
 		GET DIAGNOSTICS deleted_count = ROW_COUNT;
Index: build.properties
===================================================================
--- build.properties	(revision 7391)
+++ build.properties	(revision 7392)
@@ -2,7 +2,7 @@
 
 #Version of this build.  This needs to be a dotted numeric version.  For
 #instance 1.9.1 is okay.  1.9.1_rc1 is not.
-metacat.version=2.0.4
+metacat.version=2.0.5
 
 #This is for packaging purposes.  leave it blank for final production release.
 metacat.releaseCandidate=
Index: README
===================================================================
--- README	(revision 7391)
+++ README	(revision 7392)
@@ -8,7 +8,7 @@
 Metacat: XML Metadata and Data Management System
 ------------------------------------------------                      
 
-Version: 2.0.4 Release
+Version: 2.0.5 Release
 
 Send feedback and bugs to: metacat-dev@ecoinformatics.org
                            http://bugzilla.ecoinformatics.org
@@ -53,6 +53,11 @@
 See the file "docs/install.html" for detailed instructions
 for your OS.
 
+Release Notes for 2.0.5:
+------------------------
+This patch release focuses on Metacat support for Oracle
+*SystemMetadata table names have been shortened to comply with Oracle limits.
+
 Release Notes for 2.0.4:
 ------------------------
 This patch release focuses on Metacat-Metacat replication.
