Merged V4.0-BUG-FIX to HEAD

36915: ALF-12874: Schema reference files are out of date
   - Difference: expected primary key .alf_tenant.PRIMARY.columnNames[0]="id", but was .alf_tenant.PRIMARY.columnNames[0]="tenant_domain"
   - fixed the rename of alf_tenant PK "id" -> "tenant_domain" (for all 5 DB types)
   36950: Merged V4.0 to V4.0-BUG-FIX (RECORD ONLY)
      36917: Merged V4.0-BUG-FIX to V4.0
         36915: ALF-12874: Schema reference files are out of date
         - Difference: expected primary key .alf_tenant.PRIMARY.columnNames[0]="id", but was .alf_tenant.PRIMARY.columnNames[0]="tenant_domain"
         - fixed the rename of alf_tenant PK "id" -> "tenant_domain" (for all 5 DB types)
   36951: Merged V4.0 (4.0.2) to V4.0-BUG-FIX (4.0.3)
      36949: ALF-13745: Merged V3.4-BUG-FIX (3.4.10) to V4.0 (4.0.2)
         36948: ALF-13667 Additional OpenOffice mimetypes to be added to the mime-type maps
            - On reflection the maxSourceSizeKBytes limits for power point files were too small. Did not take into account
              images in the files rather than just text.
      36923: Merged DEV to V4.0
         36600: ALF-14129 : Failed to do upgrade from 3.4.8 to 4.0.2
            Statements from ActivitiTaskIdIndexes.sql script were marked as optional.
      36922: Merged DEV to V4.0
         36729: ALF-14129 : Failed to do upgrade from 3.4.8 to 4.0.2
            Outdated Schema-Reference-ACT.xml were updated for all dialects and regression after ALF-12874 was fixed.
   36953: Merged BRANCHES/DEV/V3.4-BUG-FIX to BRANCHES/DEV/V4.0-BUG-FIX
      36905: ALF-14178 Share - Path issue with number of character limitation. Updated qname to max DB limit of 255 chars.
   36954: ALF-14209 SOLR - does not support query for all stores
   - it is now possible for SOLR to track any store and Alfresco to execute queries against that store (no federation or sharding yet ....)
   36965: Extra debugging after review of ALF-14238
   37032: ALF-12723: Missing mergeinfo for r34655
   37033: Merged V4.0 to V4.0-BUG-FIX
      36999: ALF-5285: Reverse merging r26226, as it causes regressions ALF-14202, ALF-14242 and ALF-14245
      37001: ALF-14169: Alfresco startup fails if XAM module was deployed
         Jan approved fix
      37005: ALF-14169: Fix unit test compilation
      37020: Resolved some "Patch description is not available" warnings in 4.0.2
      37022: ALF-12874: Schema reference files are out of date
      - Fixed up PostgreSQL diffs
      37027: ALF-12874: Schema reference files are out of date
      - DB2 fixes by Dmitry


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@37036 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2012-05-25 17:19:13 +00:00
parent 18ad785d32
commit ff2ae89c08
22 changed files with 366 additions and 130 deletions

View File

@@ -236,7 +236,8 @@ public class ExportDb
}
// Oracle hack: ignore tables in the recycle bin
if (tableName.startsWith("BIN$"))
// ALF-14129 fix, check whether schema already contains object with provided name
if (tableName.startsWith("BIN$") || schema.containsByName(tableName))
{
continue;
}

View File

@@ -192,7 +192,8 @@ public class ForeignKey extends AbstractDbObject
{
return false;
}
if (!getTargetTable().equals(otherFK.getTargetTable()))
// ALF-14129 fix, make table names case insensitive
if (!getTargetTable().equalsIgnoreCase(otherFK.getTargetTable()))
{
return false;
}

View File

@@ -118,5 +118,10 @@ public class ForeignKeyTest extends DbObjectTestBase<ForeignKey>
thisFK = new ForeignKey(parent, "the_fk", "local_col", "target_table", "target_col");
thatFK = new ForeignKey(parent, "the_fk", "local_col", "target_table", "target_col2");
assertFalse("FKs have different target column.", thisFK.sameAs(thatFK));
// ALF-14129 fix test
thisFK = new ForeignKey(parent, "the_fk", "local_col", "target_table", "target_col");
thatFK = new ForeignKey(parent, "the_fk", "local_col", "TARGET_TABLE", "target_col");
assertTrue("FKs are case sensitive to targetTable's name.", thisFK.sameAs(thatFK));
}
}

View File

@@ -192,4 +192,21 @@ public class Schema extends AbstractDbObject implements Iterable<DbObject>
}
return true;
}
/*
* ALF-14129 fix, checks whether the schema already contains object with provided name.
* (this method is case insensitive to object's name)
*/
public boolean containsByName(String name)
{
Iterator<DbObject> iterator = iterator();
while (iterator.hasNext())
{
if (iterator.next().getName().equalsIgnoreCase(name))
{
return true;
}
}
return false;
}
}