Merge branch 'noglob' of https://gitlab.edu.yar.ru/composer/PHP_Library into noglob
This commit is contained in:
commit
7163158baf
1 changed files with 209 additions and 200 deletions
|
|
@ -35,6 +35,9 @@ class Manager
|
||||||
case "renameColumn":
|
case "renameColumn":
|
||||||
$this->RenameColumn($action["table"], $action["old_name"], $action["new_name"]);
|
$this->RenameColumn($action["table"], $action["old_name"], $action["new_name"]);
|
||||||
break;
|
break;
|
||||||
|
case "createView":
|
||||||
|
$this->recreateView($action["view"], $action["select"]);
|
||||||
|
break;
|
||||||
case "executeFile":
|
case "executeFile":
|
||||||
if ($this->db->isPostgres() && isset($action["pgsql"])) {
|
if ($this->db->isPostgres() && isset($action["pgsql"])) {
|
||||||
$file = $action["pgsql"];
|
$file = $action["pgsql"];
|
||||||
|
|
@ -53,6 +56,12 @@ class Manager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Дропает и создаёт SQL VIEW
|
||||||
|
public function recreateView($viewName, $selectStatement) {
|
||||||
|
$this->db->query("DROP VIEW ".$viewName);
|
||||||
|
$this->db->query("CREATE VIEW ".$viewName." AS ".$selectStatement);
|
||||||
|
}
|
||||||
|
|
||||||
public function DropTableQuery($table, $cascade=false) {
|
public function DropTableQuery($table, $cascade=false) {
|
||||||
$statement = "DROP TABLE IF EXISTS ".$table;
|
$statement = "DROP TABLE IF EXISTS ".$table;
|
||||||
if ($this->db->isPostgres()&&$cascade) {
|
if ($this->db->isPostgres()&&$cascade) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue