Class SampleDataCommand
Sample/dummy data exporter.
A command for exporting non-application (human-entered) data into an SQL script for use as sample data. Requires the "mysqldump" utility to be installed on the system.
The SQL generated by this script can be used as an alternate method for exporting data, reinstalling and importing data into the fresh installation. Note, however that it does not save custom modules or any of the tables listed in $tblsExclude for these reasons:
- x2_auth tables: there is no easy, reliable way of distinguishing user-entered data in this table from default application data.
- x2_sessions/x2_temp_files: This data is entirely ephemeral
- x2_timezones/x2_timezone_points: This is static data inserted during installation and doesn't need to be exported.
Note also that any files in the uploads folder will also need to be backed up, if the data is to be re-used elsewhere; references to files on the server will otherwise point to nonexistent files.
- CComponent
- CConsoleCommand
- SampleDataCommand
Author: Demitri Morgan <demitri@x2engine.com>
Located at x2engine/protected/commands/SampleDataCommand.php
public
str
|
|
public
type
|
|
public
|
#
actionFutureTimes( type $args )
Hunts through the database for in-the-future timestamps and reports them |
public
|
|
public
type
|
#
timeCompressSql( string $column, type $ti, type $dtMax, type $dtMaxNew )
Generates update SQL for a timestamp column to "compress" times |
__construct(),
afterAction(),
beforeAction(),
behaviors(),
buildFileList(),
confirm(),
copyFiles(),
ensureDirectory(),
getCommandRunner(),
getHelp(),
getName(),
getOptionHelp(),
init(),
onAfterAction(),
onBeforeAction(),
pluralize(),
prompt(),
renderFile(),
resolveRequest(),
run(),
usageError()
|
__call(),
__get(),
__isset(),
__set(),
__unset(),
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|
public
mixed
|
$pdo |
|
$defaultAction
|
$commandRunner,
$help,
$name,
$optionHelp
|