Migrator

class OC\DB\Migrator
Source:lib/private/DB/Migrator.php#46

Properties

protected static property OC\DB\Migrator::$connection
Source:lib/private/DB/Migrator.php#49
Type:\Doctrine\DBAL\Connection
protected static property OC\DB\Migrator::$config
Source:lib/private/DB/Migrator.php#52
Type:\OCP\IConfig

Methods

public OC\DB\Migrator::__construct($connection, $config, $dispatcher=null)
Source:

lib/private/DB/Migrator.php#65

Parameters:
  • $connection (Doctrine\DBAL\Connection)
  • $config (OCP\IConfig)
  • $dispatcher (Symfony\Component\EventDispatcher\EventDispatcherInterface)
public OC\DB\Migrator::migrate($targetSchema)
Source:

lib/private/DB/Migrator.php#78

Parameters:
  • $targetSchema (Doctrine\DBAL\Schema\Schema)
Throws:

\Doctrine\DBAL\Exception

public OC\DB\Migrator::generateChangeScript($targetSchema)
Source:

lib/private/DB/Migrator.php#87

Parameters:
  • $targetSchema (Doctrine\DBAL\Schema\Schema)
Returns:

string

public OC\DB\Migrator::createSchema()
Source:lib/private/DB/Migrator.php#102
Throws:\Doctrine\DBAL\Exception
protected OC\DB\Migrator::getDiff($targetSchema, $connection)
Source:

lib/private/DB/Migrator.php#119

Parameters:
  • $targetSchema (Doctrine\DBAL\Schema\Schema)
  • $connection (Doctrine\DBAL\Connection)
Returns:

\Doctrine\DBAL\Schema\SchemaDiff

protected OC\DB\Migrator::applySchema($targetSchema, $connection=null)
Source:

lib/private/DB/Migrator.php#165

Parameters:
  • $targetSchema (Doctrine\DBAL\Schema\Schema)
  • $connection (Doctrine\DBAL\Connection)
Throws:

\Doctrine\DBAL\Exception

protected OC\DB\Migrator::convertStatementToScript($statement)
Source:

lib/private/DB/Migrator.php#190

Parameters:
  • $statement
Returns:

string

protected OC\DB\Migrator::getFilterExpression()
Source:lib/private/DB/Migrator.php#197
protected OC\DB\Migrator::emit($sql, $step, $max)
Source:lib/private/DB/Migrator.php#201