PHP 클래스 MigrateShell, cakephp-db-migrations

상속: extends Shell
파일 보기 프로젝트 열기: joelmoss/cakephp-db-migrations

공개 프로퍼티들

프로퍼티 타입 설명
$_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