ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
migrateto30.php File Reference

Go to the source code of this file.

Variables

if($argc< 2) $paths
 
foreach($paths as $path) $dsn = $argv[1]
 
 $user = isset($argv[2]) ? $argv[2] : null
 
 $pass = isset($argv[3]) ? $argv[3] : null
 
 $pdo = new PDO($dsn, $user, $pass)
 
 $driver = $pdo->getAttribute(PDO::ATTR_DRIVER_NAME)
 
 switch ( $driver)
 
 $addValueType = false
 
 try
 
 $row = $result->fetch(\PDO::FETCH_ASSOC)
 
if(! $row) elseif(array_key_exists('valuetype', $row)) else
 
catch(Exception $e) if ( $addValueType)
 
 $result = $pdo->query('SELECT id, uri, vcardurl FROM principals WHERE vcardurl IS NOT NULL')
 
 $stmt1 = $pdo->prepare('INSERT INTO propertystorage (path, name, valuetype, value) VALUES (?, ?, 3, ?)')
 
 while ( $row=$result->fetch(\PDO::FETCH_ASSOC))
 

Variable Documentation

◆ $addValueType

$addValueType = false

Definition at line 82 of file migrateto30.php.

◆ $driver

$driver = $pdo->getAttribute(PDO::ATTR_DRIVER_NAME)

Definition at line 66 of file migrateto30.php.

◆ $dsn

foreach ( $paths as $path) $dsn = $argv[1]

Definition at line 56 of file migrateto30.php.

◆ $pass

$pass = isset($argv[3]) ? $argv[3] : null

Definition at line 58 of file migrateto30.php.

◆ $paths

if ( $argc< 2) $paths
Initial value:
= [
__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/../../../autoload.php',
]

Definition at line 44 of file migrateto30.php.

◆ $pdo

$pdo = new PDO($dsn, $user, $pass)

Definition at line 62 of file migrateto30.php.

◆ $result

$result = $pdo->query('SELECT id, uri, vcardurl FROM principals WHERE vcardurl IS NOT NULL')

Definition at line 154 of file migrateto30.php.

◆ $row

$row = $result->fetch(\PDO::FETCH_ASSOC)

Definition at line 85 of file migrateto30.php.

◆ $stmt1

$stmt1 = $pdo->prepare('INSERT INTO propertystorage (path, name, valuetype, value) VALUES (?, ?, 3, ?)')

Definition at line 155 of file migrateto30.php.

◆ $user

$user = isset($argv[2]) ? $argv[2] : null

Definition at line 57 of file migrateto30.php.

◆ else

if (! $row) elseif (array_key_exists( 'valuetype', $row)) else
Initial value:
{
echo "2.1 schema detected. Going to perform upgrade.\n"

Definition at line 125 of file migrateto30.php.

◆ if

catch (Exception $e) if($addValueType)

Definition at line 136 of file migrateto30.php.

◆ switch

switch($driver)

Definition at line 68 of file migrateto30.php.

◆ try

try
Initial value:
{
$result = $pdo->query('SELECT * FROM propertystorage LIMIT 1')
$result
$pdo
Definition: migrateto30.php:62

Definition at line 83 of file migrateto30.php.

◆ while

while($row=$result->fetch(\PDO::FETCH_ASSOC))

Definition at line 157 of file migrateto30.php.