Path

ez components / documentation / api reference / 2008.2.3 / databaseschema


eZ Components 2008.2.3

DatabaseSchema: ezcDbSchemaDiffDbWriter

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

Interface: ezcDbSchemaDiffDbWriter

This class provides the interface for database schema difference writers [source]

Parents

ezcDbSchemaDiffWriter
   |
   --ezcDbSchemaDiffDbWriter

Method Summary

public void applyDiffToDb( $db, $schemaDiff )
Applies the differences contained in $schemaDiff to the database handler $db
public array(string) convertDiffToDDL( $schemaDiff )
Returns an array with SQL DDL statements from the differences from $schemaDiff

Inherited Methods

From ezcDbSchemaDiffWriter :
public int ezcDbSchemaDiffWriter::getDiffWriterType()
Returns what type of schema difference writer this class implements.

Methods

applyDiffToDb

void applyDiffToDb( $db, ezcDbSchemaDiff $schemaDiff )
Applies the differences contained in $schemaDiff to the database handler $db

Parameters

Name Type Description
$db ezcDbHandler  
$schemaDiff ezcDbSchemaDiff  

convertDiffToDDL

array(string) convertDiffToDDL( ezcDbSchemaDiff $schemaDiff )
Returns an array with SQL DDL statements from the differences from $schemaDiff
Converts the schema differences contained in $schemaDiff to SQL DDL that can be used to upgrade an existing database to the new version with the differences from $schemaDiff. The SQL queries are returned as an array.

Parameters

Name Type Description
$schemaDiff ezcDbSchemaDiff  

Last updated: Mon, 11 May 2009