method renameTable documentation in bbn\Db\Languages\Pgsql
Renames the given table to the new given name.
function(string $table, string $newName)
{
if ($this->check() && Str::checkName($table) && Str::checkName($newName)) {
$t1 = strpos($table, '.') ? $this->tableFullName($table, true) : $this->tableSimpleName($table, true);
$t2 = strpos($newName, '.') ? $this->tableFullName($newName, true) : $this->tableSimpleName($newName, true);
$res = $this->rawQuery(sprintf("ALTER TABLE %s RENAME TO %s", $t1, $t2));
return (bool)$res;
}
return false;
}
Renames the given table to the new given name. 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-2025
BBN Solutions