11 Commits

Author SHA1 Message Date
Matt Ward
3fab4ea0d6 ALF-7260: schema comparator - improved language of reporting.
The differences and validation messages are hopefully improved, e.g:

Difference: missing sequence from database, expected at path: .alf_acl_member_seq
Difference: missing table from database, expected at path: .alf_acl_change_set
Validation: index alfresco.some_table.idx_table_id.name="idx_table_id" fails to match rule: value must be 'xyz'

I'm sure there's still room for improvement but this should give a decent starting point.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32420 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-30 17:57:02 +00:00
Matt Ward
29dadc748a ALF-11518 and ALF-11519: unify separate validation/differences lists and move text generation to Result classes.
ALF-11518: Unify differences and validation results lists
ALF-11519: Move validation/diff result text generation from SchemaBootstrap to result classes.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32110 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-18 18:20:53 +00:00
Matt Ward
f5b08ab073 ALF-11256: SchemaBootstrap must compare running schema against reference dump
Reference schemas (e.g. classpath:org/alfresco/util/schemacomp/reference/PostgreSQLDialect-Reference.xml) are loaded (if present) and the database is compared to that reference schema.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31991 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-15 15:03:22 +00:00
Matt Ward
3df35a9d06 ALF-10771: schema validation and differences rules
Validation serialized and deserialized in XML.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31942 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-14 16:25:49 +00:00
Matt Ward
067e8fffac ALF-11255: Create tool to dump "reference" schemas to XML
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31650 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-02 18:36:02 +00:00
Matt Ward
723fe98cf2 ALF-7260: schema comparator
* replace path/push/pop mechanism as it doesn't work well at reporting where differences/validation errors occur.
* add getParent() to DbObject - so that a path-style identifier can be deduced for a DbObject when needed
* add DbProperty to specify a specific DbObject's property and value -- acts as a schema location pointer
* refactored Result code (need difference result and validation error result)





git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31527 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-27 18:07:06 +00:00
Matt Ward
ec302df6ed ALF-10771: adding validation to schema compare tool
Added support to DbObjects to accept visitors
Added ValidatingVisitor to invoke suitable validator on each DbObject
Added NameValidator and NullValidator to operate on DbObject types
Added test suites



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31494 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-26 16:01:38 +00:00
Matt Ward
9b4cd0ab0e ALF-10771: DiffContext is now passed around to provide the DB Dialect.
Instead of the Differences being passed around on their own, the DiffContext is able to provide more information -- at present just the Dialect. The dialect can be used to change the way database objects are validated or differenced.





git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31466 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-25 16:03:31 +00:00
Matt Ward
4ef52e4e72 ALF-7260: unit tests, bug fixes.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31455 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-25 08:28:13 +00:00
Matt Ward
2a5a337b4e ALF-10772: schema comparator
Compares two abstract database schemas.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31312 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-18 11:42:57 +00:00
Matt Ward
57fdad562d ALF-10770: create schema representation
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31224 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-14 08:08:12 +00:00