private function processCreateMigration($name, $fields)
    {
        $this->migrationService->processCommand('create', $name);

        // name:type:limit:null:unique
        foreach ($fields as $fieldDefinition) {
            $fieldDefinition = explode(':', $fieldDefinition);
            $fieldDefinition = array_map(function($value) {
                return (strlen($value) === 0 ? NULL : $value);
            }, $fieldDefinition);
            $this->migrationService->processCommand('addColumn', ...$fieldDefinition);
        }

        $this->migrationService->processCommand('finalise');
        $this->migrationService->create($name);
    }
private function processCreateMigration($name, $fields)
    {
        $this->migrationService->processCommand('create', $name);

        // name:type:limit:null:unique
        foreach ($fields as $fieldDefinition) {
            $fieldDefinition = explode(':', $fieldDefinition);
            $fieldDefinition = array_map(function($value) {
                return (strlen($value) === 0 ? NULL : $value);
            }, $fieldDefinition);
            $this->migrationService->processCommand('addColumn', ...$fieldDefinition);
        }

        $this->migrationService->processCommand('finalise');
        $this->migrationService->create($name);
    }
private function processCreateMigration ( $ name , $ fields ) { $ this -> migrationService -> processCommand ( 'create' , $ name ) ; // name:type:limit:null:unique foreach ( $ fields as $ fieldDefinition ) { $ fieldDefinition = explode ( ':' , $ fieldDefinition ) ; $ fieldDefinition = array_map ( function ( $ value ) { return ( strlen ( $ value ) === 0 ? NULL : $ value ) ; } , $ fieldDefinition ) ; $ this -> migrationService -> processCommand ( 'addColumn' , ... $ fieldDefinition ) ; } $ this -> migrationService -> processCommand ( 'finalise' ) ; $ this -> migrationService -> create ( $ name ) ; }
Processes the fields to create the migration

@param string $name
@param array $fields colon seperated field definitions

@return void
Processes the fields to create the migration