eZPublishCommunityProject(LegacyStack)  2013.5
ezsqldiff.php File Reference

Namespaces

 kernel
 Autoloader definition for eZ Publish Kernel files.
 

Functions

 loadDatabaseSchema ($type, $host, $user, $password, $socket, $db, $cli)
 
 loadLintSchema ($dbSchema, $cli)
 

Variables

 $cli = eZCLI::instance()
 
if(strlen(trim($sourceType))==0)
if(strlen(trim($matchType))==0) 
$ini = eZINI::instance()
 
 $matchDB = count( $options['arguments'] ) >= 2 ? $options['arguments'][1] : ''
 
 $matchDBHost = $options['match-host'] ? $options['match-host'] : $options['host']
 
 $matchDBPassword = $options['match-password'] ? $options['match-password'] : $options['password']
 
 $matchDBSocket = $options['match-socket'] ? $options['match-socket'] : $options['socket']
 
 $matchDBUser = $options['match-user'] ? $options['match-user'] : $options['user']
 
 $matchType = $options['match-type'] ? $options['match-type'] : $options['type']
 
 $options
 
 $script
 
 $sourceDB = $options['arguments'][0]
 
 $sourceDBHost = $options['source-host'] ? $options['source-host'] : $options['host']
 
 $sourceDBPassword = $options['source-password'] ? $options['source-password'] : $options['password']
 
 $sourceDBSocket = $options['source-socket'] ? $options['source-socket'] : $options['socket']
 
 $sourceDBUser = $options['source-user'] ? $options['source-user'] : $options['user']
 
 $sourceSchema = loadDatabaseSchema( $sourceType, $sourceDBHost, $sourceDBUser, $sourceDBPassword, $sourceDBSocket, $sourceDB, $cli )
 
if(count($options['arguments'])
< 1) if(count($options['arguments'])
< 2 and!$options['lint-check']) 
$sourceType = $options['source-type'] ? $options['source-type'] : $options['type']
 
if(!$sourceSchema) if($options['lint-check']) else
 

Function Documentation

loadDatabaseSchema (   $type,
  $host,
  $user,
  $password,
  $socket,
  $db,
  $cli 
)
loadLintSchema (   $dbSchema,
  $cli 
)

Variable Documentation

$cli = eZCLI::instance()
if (strlen(trim($sourceType))==0) if (strlen(trim($matchType))==0) $ini = eZINI::instance()
$matchDB = count( $options['arguments'] ) >= 2 ? $options['arguments'][1] : ''
$matchDBHost = $options['match-host'] ? $options['match-host'] : $options['host']
$matchDBPassword = $options['match-password'] ? $options['match-password'] : $options['password']
$matchDBSocket = $options['match-socket'] ? $options['match-socket'] : $options['socket']
$matchDBUser = $options['match-user'] ? $options['match-user'] : $options['user']
$matchType = $options['match-type'] ? $options['match-type'] : $options['type']
$options
Initial value:
= $script->getOptions( "[source-type:][source-host:][source-user:][source-password;][source-socket:]" .
"[match-type:][match-host:][match-user:][match-password;][match-socket:]" .
"[t:|type:][host:][u:|user:][p:|password;][socket:]" .
"[lint-check]" .
"[reverse][check-only]",
"[source][match]",
array( 'source-type' => ( "Which database type to use for source, can be one of:\n" .
"mysql, postgresql" ),
'source-host' => "Connect to host source database",
'source-user' => "User for login to source database",
'source-password' => "Password to use when connecting to source database",
'source-socket' => 'Socket to connect to source database (only for MySQL)',
'match-type' => ( "Which database type to use for match, can be one of:\n" .
"mysql, postgresql" ),
'match-host' => "Connect to host match database",
'match-user' => "User for login to match database",
'match-password' => "Password to use when connecting to match database",
'match-socket' => 'Socket to connect to match database (only for MySQL)',
'type' => ( "Which database type to use for match and source, can be one of:\n" .
"mysql, postgresql" ),
'host' => "Connect to host match and source database",
'user' => "User for login to match and source database",
'password' => "Password to use when connecting to match and source database",
'socket' => 'Socket to connect to match and source database (only for MySQL)',
'lint-check' => 'Instead of comparing 2 datase schemas, verify source database schema for standards compliance',
'reverse' => "Reverse the differences",
'check-only' => "Don't show SQLs for the differences, just set exit code and return"
) )
$script
Definition: adddefaultstates.php:22
$script
Initial value:
= eZScript::instance( array( 'description' => ( "eZ Publish SQL diff\n\n" .
"Displays differences between two database schemas,\n" .
"and sets exit code based whether there is a difference or not\n" .
"\n" .
"ezsqldiff.php --type mysql --user=root stable32 stable33" ),
'use-session' => false,
'use-modules' => true,
'use-extensions' => true ) )
static instance($settings=array())
Returns a shared instance of the eZScript class.
Definition: ezscript.php:1084
$sourceDB = $options['arguments'][0]
$sourceDBHost = $options['source-host'] ? $options['source-host'] : $options['host']
$sourceDBPassword = $options['source-password'] ? $options['source-password'] : $options['password']
$sourceDBSocket = $options['source-socket'] ? $options['source-socket'] : $options['socket']
$sourceDBUser = $options['source-user'] ? $options['source-user'] : $options['user']
$sourceSchema = loadDatabaseSchema( $sourceType, $sourceDBHost, $sourceDBUser, $sourceDBPassword, $sourceDBSocket, $sourceDB, $cli )
if (count($options['arguments'])< 1) if (count($options['arguments'])< 2 and!$options['lint-check']) $sourceType = $options['source-type'] ? $options['source-type'] : $options['type']
if (!$matchSchema) if ($options['reverse']) else
Initial value:
{
loadDatabaseSchema($type, $host, $user, $password, $socket, $db, $cli)
Definition: ezsqldiff.php:105
$matchDB
Definition: ezsqldiff.php:84
$matchType
Definition: ezsqldiff.php:79
$matchDBSocket
Definition: ezsqldiff.php:83
$matchDBPassword
Definition: ezsqldiff.php:82
$matchDBUser
Definition: ezsqldiff.php:81
$cli
Definition: adddefaultstates.php:14
$matchDBHost
Definition: ezsqldiff.php:80