Path

ez components / documentation / api reference / 1.1.1 / databaseschema


eZ Components 1.1.1

DatabaseSchema: ezcDbSchemaComparator

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcDbSchemaComparator

This class provides database comparison functionality. [source]
Example that shows how to make a comparison between a file on disk and a database.
1.      $xmlSchema ezcDbSchema::createFromFile'xml''wanted-schema.xml' );
2.      $dbSchema ezcDbSchema::createFromDb$db );
3.      $diff ezcDbSchemaComparator::compareSchemas$xmlSchema$dbSchema );

Method Summary

public static ezcDbSchemaDiff compareSchemas( $schema1, $schema2, $schema2 )
Returns a ezcDbSchemaDiff object containing the differences between the schemas $schema1 and $schema2.

Methods

compareSchemas

ezcDbSchemaDiff compareSchemas( ezcDbSchema $schema1, ezcDbSchema $schema2, ezcDbSchema $schema2 )
Returns a ezcDbSchemaDiff object containing the differences between the schemas $schema1 and $schema2.
The returned diferences are returned in such a way that they contain the operations to change the schema stored in $schema1 to the schema that is stored in $schema2.

Parameters

Name Type Description
$schema1 ezcDbSchema  
$schema2 ezcDbSchema  
$schema2 ezcDbSchema  

Last updated: Thu, 01 Nov 2007