프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$connection | string | Connection used for read. | |
$file | string | File to write. | |
$name | string | Name of the schema. | |
$path | string | Path to write location. | |
$plugin | string | Plugin name. | |
$tables | array | Set of tables. |
메소드 | 설명 | |
---|---|---|
__construct ( array $options = [] ) | Constructor | |
after ( array $event = [] ) : void | After callback to be implemented in subclasses. | |
before ( array $event = [] ) : boolean | Before callback to be implemented in subclasses. | |
build ( array $data ) : void | Builds schema object properties. | |
compare ( array | object $old, array | object $new = null ) : array | Compares two sets of schemas. | |
generateTable ( string $table, array $fields ) : string | Generate the schema code for a table. | |
load ( array $options = [] ) : array | Reads database and creates schema tables. | |
read ( array $options = [] ) : array | Reads database and creates schema tables. | |
write ( array | object $object, array $options = [] ) : mixed | Writes schema file from object or options. |
메소드 | 설명 | |
---|---|---|
_arrayDiffAssoc ( array $array1, array $array2 ) : array | Extended array_diff_assoc noticing change from/to NULL values. | |
_columns ( &$Obj ) : array | Formats Schema columns from Model Object. | |
_compareIndexes ( array $new, array $old ) : mixed | Compare two schema indexes. | |
_compareTableParameters ( array $new, array $old ) : mixed | Compare two schema files table Parameters. | |
_noPrefixTable ( string $prefix, string $table ) : string | Trim the table prefix from the full table name, and return the prefix-less table. | |
_requireFile ( string $path, string $file ) : boolean | Attempts to require the schema file specified. | |
_values ( array $values ) : array | Formats Schema columns from Model Object. |
public __construct ( array $options = [] ) | ||
$options | array | Optional load object properties. |