added autochatc database handler from DBmodel instance,
added set rootDir for Creator, added deduct numeric (unix timestamp) for datetime column, added method existsTable for Maintenance
This commit is contained in:
@ -24,7 +24,7 @@ class Maintenance
|
||||
|
||||
public string $lastMessage = '';
|
||||
|
||||
private DBmodel $dbh;
|
||||
protected DBmodel $dbh;
|
||||
|
||||
public function __construct(?DBmodel $dbh)
|
||||
{
|
||||
@ -79,6 +79,14 @@ class Maintenance
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function existsTable($table_name)
|
||||
{
|
||||
return $this->testDB(
|
||||
'SHOW TABLES LIKE "' . $table_name . '"',
|
||||
$table_name
|
||||
);
|
||||
}
|
||||
|
||||
public function checkDBTable($table_name, $definition)
|
||||
{
|
||||
if (strlen($table_name) <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user