method getAlterTable documentation in bbn\Db\Languages\Pgsql
function(string $table, array $cfg)
{
if (empty($cfg['fields'])) {
throw new \Exception(X::_('Fields are not specified'));
}
if ($this->check() && Str::checkName($table)) {
$st = 'ALTER TABLE ' . $this->escape($table) . PHP_EOL;
$done = false;
foreach ($cfg['fields'] as $name => $col) {
if (!$done) {
$done = true;
} else {
$st .= ',' . PHP_EOL;
}
$st .= $this->getAlterColumn($table, array_merge($col, [
'col_name' => $name,
'no_table_exp' => true
]));
}
}
return $st ?? '';
}
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions