update dbStruct and dbSchema to namespace
This commit is contained in:
parent
8906068ae6
commit
cfa5f7ae2b
@ -14,9 +14,11 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Dotclear\Plugin\Uninstaller\Cleaner;
|
namespace Dotclear\Plugin\Uninstaller\Cleaner;
|
||||||
|
|
||||||
use dbSchema;
|
|
||||||
use dbStruct;
|
|
||||||
use dcCore;
|
use dcCore;
|
||||||
|
use Dotclear\Database\{
|
||||||
|
AbstractSchema,
|
||||||
|
Structure
|
||||||
|
};
|
||||||
use Dotclear\Database\Statement\{
|
use Dotclear\Database\Statement\{
|
||||||
DeleteStatement,
|
DeleteStatement,
|
||||||
DropStatement,
|
DropStatement,
|
||||||
@ -83,7 +85,7 @@ class Tables extends AbstractCleaner
|
|||||||
|
|
||||||
public function values(): array
|
public function values(): array
|
||||||
{
|
{
|
||||||
$object = dbSchema::init(dcCore::app()->con);
|
$object = AbstractSchema::init(dcCore::app()->con);
|
||||||
$res = $object->getTables();
|
$res = $object->getTables();
|
||||||
|
|
||||||
$rs = [];
|
$rs = [];
|
||||||
@ -121,7 +123,7 @@ class Tables extends AbstractCleaner
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if ($action == 'delete') {
|
if ($action == 'delete') {
|
||||||
$struct = new dbStruct(dcCore::app()->con, dcCore::app()->prefix);
|
$struct = new Structure(dcCore::app()->con, dcCore::app()->prefix);
|
||||||
if ($struct->tableExists($ns)) {
|
if ($struct->tableExists($ns)) {
|
||||||
$sql = new DropStatement();
|
$sql = new DropStatement();
|
||||||
$sql->from(dcCore::app()->prefix . $ns)
|
$sql->from(dcCore::app()->prefix . $ns)
|
||||||
|
Loading…
Reference in New Issue
Block a user