FRED™
3.0
FRED™: Framework for Rapid and Easy Development
|
Public Member Functions | |
diff () | |
Difference between current database state and desired state based on migration files. More... | |
execute () | |
Migrate the database. More... | |
Public Member Functions inherited from Component | |
__construct ($fred, $config=null) | |
__destruct () | |
clientConfig () | |
Public configuration. More... | |
config ($key, $default=null) | |
Retrieve a config value. More... | |
ping () | |
Ping function. More... | |
filemtime ($filename) | |
Filemtime with session cache. More... | |
component ($name) | |
Get a component (local or default). More... | |
components (... $names) | |
Get multiple components in an array. More... | |
Public Member Functions inherited from Thing | |
propertyExists ($property) | |
Check if a property exists (public or published). More... | |
constants ($prefix=null) | |
Return all constants. More... | |
get ($key) | |
Get one or more properties. More... | |
set ($key, $value=null) | |
Set one or more properties. More... | |
__get ($key) | |
__set ($key, $value) | |
Data Fields | |
const | ACTION_EXEC = 'exec' |
New. More... | |
const | ACTION_UNDO = 'undo' |
Removed. More... | |
const | ACTION_REDO = 'redo' |
Changed. More... | |
const | ACTION_TEST = 'test' |
Testing. More... | |
$mask = '*.sql' | |
Format for migration files. More... | |
$path = null | |
Directory with migration files (including trailing delimiter). More... | |
$delimiter = '///// [action]' | |
Delimiter for the migration file parts ([action] holds the action). More... | |
$test = false | |
Execute the 'test' part of the migration file. More... | |
Data Fields inherited from Component | |
$filemtimeTtl = 0 | |
Data Fields inherited from Thing | |
const | HIDDEN = 0 |
Property is hidden. More... | |
const | READABLE = 1 |
Property is readable. More... | |
const | WRITEABLE = 2 |
Property is writeable. More... | |
const | READWRITE = 3 |
Property is readable and writeable. More... | |
Protected Member Functions | |
flatten ($sql) | |
dir ($path) | |
Return all migration files in a directory. More... | |
split ($sql) | |
getCurrent () | |
setCurrent ($value) | |
getCurrentPath () | |
Protected Member Functions inherited from Component | |
init () | |
done () | |
getSession () | |
Protected Member Functions inherited from Thing | |
publish ($property, $visibility=self::READABLE) | |
Publish a property (or hide it again). More... | |
configure ($config) | |
Configure the object. More... | |
_get ($key) | |
Default getter if no specific setter is defined, and the property is also not published (readable). More... | |
_set ($key, $value) | |
Default setter if no specific setter is defined, and the property is also not published (writeable). More... | |
Protected Attributes | |
$_db = null | |
$_currentPath = null | |
Path with current files (keep out of version control; empty = path + "current/"). More... | |
$_current = null | |
Protected Attributes inherited from Component | |
$_fred = null | |
$_config = null | |
$_name = null | |
$_components = [] | |
Local components (key = component name, value = component). More... | |
$_session = null | |
Protected Attributes inherited from Thing | |
$_published = [] | |
Published properties (key = name of property, value = visibility). More... | |
Definition at line 5 of file Migrate.php.
diff | ( | ) |
Difference between current database state and desired state based on migration files.
Definition at line 41 of file Migrate.php.
|
protected |
Return all migration files in a directory.
string | $path |
Definition at line 30 of file Migrate.php.
execute | ( | ) |
Migrate the database.
Definition at line 71 of file Migrate.php.
|
protected |
Definition at line 22 of file Migrate.php.
|
protected |
Definition at line 102 of file Migrate.php.
|
protected |
Definition at line 112 of file Migrate.php.
|
protected |
Definition at line 107 of file Migrate.php.
|
protected |
Definition at line 51 of file Migrate.php.
|
protected |
Definition at line 20 of file Migrate.php.
|
protected |
Path with current files (keep out of version control; empty = path + "current/").
Definition at line 18 of file Migrate.php.
|
protected |
Definition at line 17 of file Migrate.php.
$delimiter = '///// [action]' |
Delimiter for the migration file parts ([action] holds the action).
Definition at line 14 of file Migrate.php.
$mask = '*.sql' |
Format for migration files.
Definition at line 12 of file Migrate.php.
$path = null |
Directory with migration files (including trailing delimiter).
Definition at line 13 of file Migrate.php.
$test = false |
Execute the 'test' part of the migration file.
Definition at line 15 of file Migrate.php.
const ACTION_EXEC = 'exec' |
New.
Definition at line 7 of file Migrate.php.
const ACTION_REDO = 'redo' |
Changed.
Definition at line 9 of file Migrate.php.
const ACTION_TEST = 'test' |
Testing.
Definition at line 10 of file Migrate.php.
const ACTION_UNDO = 'undo' |
Removed.
Definition at line 8 of file Migrate.php.