Path

ez components / documentation / api reference / 2008.2.3 / databaseschema


eZ Components 2008.2.3

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( $fromSchema, $toSchema, $toSchema )
Returns a ezcDbSchemaDiff object containing the differences between the schemas $fromSchema and $toSchema.

Methods

compareSchemas

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

Parameters

Name Type Description
$fromSchema ezcDbSchema  
$toSchema ezcDbSchema  
$toSchema ezcDbSchema  

Last updated: Mon, 11 May 2009