mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Schema comparator: added optional <schema> level attribute to allow ignoring of table column ordering during schema validation.
<schema ... tablecolumnorder="false"> The above snippet will disable column order checking for tables. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@46517 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -40,6 +40,7 @@ public class Schema extends AbstractDbObject implements Iterable<DbObject>
|
||||
protected final List<DbObject> objects = new ArrayList<DbObject>();
|
||||
protected final String dbPrefix;
|
||||
protected final int version;
|
||||
protected final boolean checkTableColumnOrder;
|
||||
|
||||
/**
|
||||
* Construct a schema with the given name and no database prefix.
|
||||
@@ -48,7 +49,7 @@ public class Schema extends AbstractDbObject implements Iterable<DbObject>
|
||||
*/
|
||||
public Schema(String name)
|
||||
{
|
||||
this(name, "", 0);
|
||||
this(name, "", 0, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,12 +62,13 @@ public class Schema extends AbstractDbObject implements Iterable<DbObject>
|
||||
* @param name
|
||||
* @param dbPrefix
|
||||
*/
|
||||
public Schema(String name, String dbPrefix, int schemaVersion)
|
||||
public Schema(String name, String dbPrefix, int schemaVersion, boolean checkTableColumnOrder)
|
||||
{
|
||||
super(null, name);
|
||||
ParameterCheck.mandatory("dbPrefix", dbPrefix);
|
||||
this.dbPrefix = dbPrefix;
|
||||
this.version = schemaVersion;
|
||||
this.checkTableColumnOrder = checkTableColumnOrder;
|
||||
|
||||
addDefaultValidators();
|
||||
}
|
||||
@@ -129,6 +131,14 @@ public class Schema extends AbstractDbObject implements Iterable<DbObject>
|
||||
return this.version;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the checkTableColumnOrder
|
||||
*/
|
||||
public boolean isCheckTableColumnOrder()
|
||||
{
|
||||
return this.checkTableColumnOrder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
|
Reference in New Issue
Block a user