mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 07:34:41 +01:00
Update create table statements.
This commit is contained in:
parent
ab168ce655
commit
dedf20ea1b
@ -61,12 +61,13 @@ class Mysql
|
||||
*/
|
||||
private static function createDb(ConnectionConfig $config)
|
||||
{
|
||||
wait(call(function() use($config) {
|
||||
wait(call(static function() use($config) {
|
||||
$db = $config->getDatabase();
|
||||
$connection = pool($config->withDatabase(null));
|
||||
yield $connection->query("
|
||||
CREATE DATABASE IF NOT EXISTS `{$db}`
|
||||
CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
|
||||
CHARACTER SET 'utf8mb4'
|
||||
COLLATE 'utf8mb4_general_ci'
|
||||
");
|
||||
$connection->close();
|
||||
}));
|
||||
|
@ -268,6 +268,9 @@ class MysqlArray implements DbArray
|
||||
`ts` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`key`)
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
CHARACTER SET 'utf8mb4'
|
||||
COLLATE 'utf8mb4_general_ci'
|
||||
");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user