00001 <?php 00002 // 00003 // Created on: <28-Jan-2004 16:22:02 dr> 00004 // 00005 // ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ## 00006 // SOFTWARE NAME: eZ publish 00007 // SOFTWARE RELEASE: 3.9.x 00008 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 00009 // SOFTWARE LICENSE: GNU General Public License v2.0 00010 // NOTICE: > 00011 // This program is free software; you can redistribute it and/or 00012 // modify it under the terms of version 2.0 of the GNU General 00013 // Public License as published by the Free Software Foundation. 00014 // 00015 // This program is distributed in the hope that it will be useful, 00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 // GNU General Public License for more details. 00019 // 00020 // You should have received a copy of version 2.0 of the GNU General 00021 // Public License along with this program; if not, write to the Free 00022 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00023 // MA 02110-1301, USA. 00024 // 00025 // 00026 // ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## 00027 // 00028 00029 include ('lib/ezdbschema/classes/ezdbschema.php'); 00030 include ('lib/ezdbschema/classes/ezdbschemachecker.php'); 00031 00032 $dbschema1 = new eZDbSchema(); 00033 $schema1 = $dbschema1->readArray( '/tmp/schema1.php' ); 00034 00035 $dbschema2 = new eZDbSchema(); 00036 $schema2 = $dbschema2->readArray( '/tmp/schema2.php' ); 00037 00038 $differences = eZDbSchemaChecker::diff( $schema1, $schema2 ); /* empty 2nd param force new script */ 00039 00040 var_dump($differences); 00041 ezDbSchema::writeUpgradeFile( $differences, 'schema-diff.php' ); 00042 00043 ?>
1.6.3