Skip to content

Commit eb49d69

Browse files
committed
Fixed table not created in mysql mode
1 parent 51b0089 commit eb49d69

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

backend/class/db/MySQL.class.php

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ function __construct(string $host = '', string $user = '', string $password = ''
2323

2424
$this->table = 'tpv';
2525
$this->timeout = 3;
26+
27+
// ensure table exists
28+
$this->runMysql("CREATE TABLE IF NOT EXISTS `$this->table` (`key` varchar(200) NOT NULL, `value` varchar(4096) DEFAULT NULL, UNIQUE KEY `key` (`key`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
2629
}
2730
function setTable(string $table) {
2831
$this->table = $table;

0 commit comments

Comments
 (0)