PHP Класс MigrateShell, cakephp-db-migrations

Наследование: extends Shell
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$_is_plugin True is shell is used as part of a plugin
$_usePrefix Should we use a table prefix, as specified in DB config
$background
$current_migration Current migration data
$dataSource The datasource that should be used.
$db The database object
$empty_migration Empty migration data
$foreground
$id_format
$migrations Array of migrations
$options
$schema_table Name of the schema migrations table
$styles
$target_migration Target migration data
$types DB column/field types
$unmigrated_migrations Un-migrated migrations
$use_uuid If true, will use Cake's UUID's for primary key.
$uuid_format

Открытые методы

Метод Описание
__buildUpSchema ( $tableName )
_array2Sql ( $array )
_buildSchema ( array $tables = null, $allTables = false ) : unknown Burns the provided tables Schema into a YAML file suitable for migrations
_buildYaml ( $tables )
_colorize ( $text = '', $style = null )
_filterMigrationTable ( $myTables )
_fromDb ( )
_getMigrations ( )
_getName ( ) : the Forces the user to specify the model he wants to bake, and returns the selected model name.
_getProperties ( $props )
_getTables ( ) Gets the tables in DB according to your connection configuration
_hasMigrations ( )
_initDatabase ( )
_listAll ( ) : output Outputs the a list of possible models or controllers from database
_loadVendor ( $class )
_mate ( string $file ) Gives the user an option to open a specified file in Textmate
_parsePhp ( $file )
_printQuery ( )
_run ( $target_direction = null )
_sortMigrations ( $dir = 'up' )
_startMigration ( $id, $direction )
_supportsColors ( )
_versionIt ( $num ) Converts migration number to a minimum three digit number.
_welcome ( )
all ( ) Runs all migrations from the current version down and back up to the latest version.
down ( ) Migrates down to the previous version
err ( $str )
full_schema ( ) Migrates the full_schema.yml migration file.
g ( )
gen ( ) Aliases for generate method
generate ( ) Generates a migration file. You can pass the file name on the command line, or wait for the prompt.
h ( ) Aliases for help method
help ( ) Help method
info ( ) Prints list of migration files and provides info about each one
main ( ) Main method: migrates to the latest version.
out ( string $string = '', boolean $newline = true ) Modifies the out method for prettier formatting
reset ( ) Reset's migration version without running migrations up or down and drops all tables
startup ( )
up ( ) Migrates up to the next version

Описание методов

__buildUpSchema() публичный Метод

public __buildUpSchema ( $tableName )

_array2Sql() публичный Метод

public _array2Sql ( $array )

_buildSchema() публичный Метод

Burns the provided tables Schema into a YAML file suitable for migrations
public _buildSchema ( array $tables = null, $allTables = false ) : unknown
$tables array
Результат unknown

_buildYaml() публичный Метод

public _buildYaml ( $tables )

_colorize() публичный Метод

public _colorize ( $text = '', $style = null )

_filterMigrationTable() публичный Метод

public _filterMigrationTable ( $myTables )

_fromDb() публичный Метод

public _fromDb ( )

_getMigrations() публичный Метод

public _getMigrations ( )

_getName() публичный Метод

Forces the user to specify the model he wants to bake, and returns the selected model name.
public _getName ( ) : the
Результат the model name

_getProperties() публичный Метод

public _getProperties ( $props )

_getTables() публичный Метод

Gets the tables in DB according to your connection configuration
public _getTables ( )

_hasMigrations() публичный Метод

public _hasMigrations ( )

_initDatabase() публичный Метод

public _initDatabase ( )

_listAll() публичный Метод

Outputs the a list of possible models or controllers from database
public _listAll ( ) : output
Результат output

_loadVendor() публичный Метод

public _loadVendor ( $class )

_mate() публичный Метод

Gives the user an option to open a specified file in Textmate
public _mate ( string $file )
$file string a file that will be opened with Textmate

_parsePhp() публичный Метод

public _parsePhp ( $file )

_printQuery() публичный Метод

public _printQuery ( )

_run() публичный Метод

public _run ( $target_direction = null )

_sortMigrations() публичный Метод

public _sortMigrations ( $dir = 'up' )

_startMigration() публичный Метод

public _startMigration ( $id, $direction )

_supportsColors() публичный Метод

public _supportsColors ( )

_versionIt() публичный Метод

Converts migration number to a minimum three digit number.
public _versionIt ( $num )
$num The number to convert

_welcome() публичный Метод

public _welcome ( )

all() публичный Метод

Runs all migrations from the current version down and back up to the latest version.
public all ( )

down() публичный Метод

Migrates down to the previous version
public down ( )

err() публичный Метод

public err ( $str )

full_schema() публичный Метод

Migrates the full_schema.yml migration file.
public full_schema ( )

g() публичный Метод

public g ( )

gen() публичный Метод

Aliases for generate method
public gen ( )

generate() публичный Метод

Example: 'cake migrate generate my migration file name'
public generate ( )

h() публичный Метод

Aliases for help method
public h ( )

help() публичный Метод

Help method
public help ( )

info() публичный Метод

Prints list of migration files and provides info about each one
public info ( )

main() публичный Метод

Main method: migrates to the latest version.
public main ( )

out() публичный Метод

Modifies the out method for prettier formatting
public out ( string $string = '', boolean $newline = true )
$string string String to output.
$newline boolean If true, the outputs gets an added newline.

reset() публичный Метод

Reset's migration version without running migrations up or down and drops all tables
public reset ( )

startup() публичный Метод

public startup ( )

up() публичный Метод

Migrates up to the next version
public up ( )

Описание свойств

$_is_plugin публичное свойство

True is shell is used as part of a plugin
public $_is_plugin

$_usePrefix публичное свойство

Should we use a table prefix, as specified in DB config
public $_usePrefix

$background публичное свойство

public $background

$current_migration публичное свойство

Current migration data
public $current_migration

$dataSource публичное свойство

The datasource that should be used.
public $dataSource

$db публичное свойство

The database object
public $db

$empty_migration публичное свойство

Empty migration data
public $empty_migration

$foreground публичное свойство

public $foreground

$id_format публичное свойство

public $id_format

$migrations публичное свойство

Array of migrations
public $migrations

$options публичное свойство

public $options

$schema_table публичное свойство

Name of the schema migrations table
public $schema_table

$styles публичное свойство

public $styles

$target_migration публичное свойство

Target migration data
public $target_migration

$types публичное свойство

DB column/field types
public $types

$unmigrated_migrations публичное свойство

Un-migrated migrations
public $unmigrated_migrations

$use_uuid публичное свойство

If true, will use Cake's UUID's for primary key.
public $use_uuid

$uuid_format публичное свойство

public $uuid_format