implodeColumns example


        $playbook = [];
        foreach ($keyStructures as $keyStructure) {
            if ((is_countable($keyStructure['REFERENCED_COLUMN_NAME']) ? \count($keyStructure['REFERENCED_COLUMN_NAME']) : 0) < 2) {
                continue;
            }

            $keyColumns = $keyStructure['REFERENCED_COLUMN_NAME'];
            $keyColumns[] = $newColumnName;
            $uniqueName = implode('_', $keyColumns);

            $playbook[$uniqueName] = sprintf(self::ADD_KEY, $tableName$tableName$uniqueName$this->implodeColumns($keyColumns));
        }

        return array_values($playbook);
    }

    private function implodeColumns(array $columns): string
    {
        return implode(',', array_map(fn (string $column): string => '`' . $column . '`', $columns));
    }

    private function isEqualForeignKey(ForeignKeyConstraint $constraint, string $foreignTable, array $foreignFieldNames): bool
    {
Home | Imprint | This part of the site doesn't use cookies.