PHP 클래스 Ruckusing_Adapter_MySQL_TableDefinition, ruckusing-migrations

파일 보기 프로젝트 열기: ruckus/ruckusing-migrations 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Ruckusing_Adapter_MySQL_Base $adapter, string $name, array $options = [] ) : Ruckusing_Adapter_MySQL_TableDefinition Creates an instance of Ruckusing_Adapters_MySQL_Adapter
column ( string $column_name, string $type, array $options = [] ) Create a column
finish ( boolean $wants_sql = false ) : boolean | string Table definition
timestamps ( string $created_column_name = "created_at", string $updated_column_name = "updated_at" ) Shortcut to create timestamps columns (default created_at, updated_at)

비공개 메소드들

메소드 설명
columns_to_str ( ) : string get all columns
init_sql ( string $name, array $options ) Init create sql
keys ( ) : string Get all primary keys

메소드 상세

__construct() 공개 메소드

Creates an instance of Ruckusing_Adapters_MySQL_Adapter
public __construct ( Ruckusing_Adapter_MySQL_Base $adapter, string $name, array $options = [] ) : Ruckusing_Adapter_MySQL_TableDefinition
$adapter Ruckusing_Adapter_MySQL_Base the current adapter
$name string the table name
$options array the options
리턴 Ruckusing_Adapter_MySQL_TableDefinition

column() 공개 메소드

Create a column
public column ( string $column_name, string $type, array $options = [] )
$column_name string the column name
$type string the column type
$options array

finish() 공개 메소드

Table definition
public finish ( boolean $wants_sql = false ) : boolean | string
$wants_sql boolean
리턴 boolean | string | string

timestamps() 공개 메소드

Shortcut to create timestamps columns (default created_at, updated_at)
public timestamps ( string $created_column_name = "created_at", string $updated_column_name = "updated_at" )
$created_column_name string Created at column name
$updated_column_name string Updated at column name