Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
DatabaseReversor Class Reference

Public Member Functions

 __construct (DbGenerator $generator, $databaseOffset='default')
 
 createDatabase (string $name, bool $createDb=true)
 
 generateTablesForModels (?array $models=null, bool $execute=false)
 
 migrate ()
 
 __toString ()
 
 getScript ()
 
 setModels ($models)
 

Protected Member Functions

 getWrapperInstance (&$config, $databaseOffset='default')
 

Private Member Functions

 getDbName ()
 
 checkManyToManyFields (DatabaseChecker $checker, string $table, string $field, &$newMissingPks)
 

Private Attributes

 $generator
 
 $database
 
 $models
 
 $dbOffset
 

Detailed Description

Definition at line 24 of file DatabaseReversor.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( DbGenerator  $generator,
  $databaseOffset = 'default' 
)

Definition at line 34 of file DatabaseReversor.php.

Member Function Documentation

◆ __toString()

__toString ( )

Definition at line 164 of file DatabaseReversor.php.

◆ checkManyToManyFields()

checkManyToManyFields ( DatabaseChecker  $checker,
string  $table,
string  $field,
$newMissingPks 
)
private

Definition at line 153 of file DatabaseReversor.php.

◆ createDatabase()

createDatabase ( string  $name,
bool  $createDb = true 
)

Definition at line 54 of file DatabaseReversor.php.

◆ generateTablesForModels()

generateTablesForModels ( ?array  $models = null,
bool  $execute = false 
)

Definition at line 74 of file DatabaseReversor.php.

◆ getDbName()

getDbName ( )
private

Definition at line 86 of file DatabaseReversor.php.

◆ getScript()

getScript ( )

Definition at line 168 of file DatabaseReversor.php.

◆ getWrapperInstance()

getWrapperInstance ( $config,
  $databaseOffset = 'default' 
)
protected

Definition at line 42 of file DatabaseReversor.php.

◆ migrate()

migrate ( )

Definition at line 95 of file DatabaseReversor.php.

◆ setModels()

setModels (   $models)

Definition at line 172 of file DatabaseReversor.php.

Field Documentation

◆ $database

$database
private

Definition at line 28 of file DatabaseReversor.php.

◆ $dbOffset

$dbOffset
private

Definition at line 32 of file DatabaseReversor.php.

◆ $generator

$generator
private

Definition at line 26 of file DatabaseReversor.php.

◆ $models

$models
private

Definition at line 30 of file DatabaseReversor.php.


The documentation for this class was generated from the following file: