src/CsvMigration.php
private function createFromCsv(array $data, string $table) : void
    {
        foreach ($data as $col) {
            $csvField = new CsvField($col);
            $dbFields = $this->factory->fieldToDb($csvField, $table);

            if (empty($dbFields)) {
                continue;
            }

            foreach ($dbFields as $dbField) {
                $this->createColumn($dbField);
            }
        }
    }
private function createFromCsv(array $data, string $table) : void
    {
        foreach ($data as $col) {
            $csvField = new CsvField($col);
            $dbFields = $this->factory->fieldToDb($csvField, $table);

            if (empty($dbFields)) {
                continue;
            }

            foreach ($dbFields as $dbField) {
                $this->createColumn($dbField);
            }
        }
    }
private function createFromCsv ( array $ data , string $ table ) : void { foreach ( $ data as $ col ) { $ csvField = new CsvField ( $ col ) ; $ dbFields = $ this -> factory -> fieldToDb ( $ csvField , $ table ) ; if ( empty ( $ dbFields ) ) { continue ; } foreach ( $ dbFields as $ dbField ) { $ this -> createColumn ( $ dbField ) ; } } }
Create new fields from JSON data.

@param mixed[] $data JSON data
@param string $table Table name
@return void
Create new fields from JSON data .