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)
|
private static function createDb(ConnectionConfig $config)
|
||||||
{
|
{
|
||||||
wait(call(function() use($config) {
|
wait(call(static function() use($config) {
|
||||||
$db = $config->getDatabase();
|
$db = $config->getDatabase();
|
||||||
$connection = pool($config->withDatabase(null));
|
$connection = pool($config->withDatabase(null));
|
||||||
yield $connection->query("
|
yield $connection->query("
|
||||||
CREATE DATABASE IF NOT EXISTS `{$db}`
|
CREATE DATABASE IF NOT EXISTS `{$db}`
|
||||||
CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
|
CHARACTER SET 'utf8mb4'
|
||||||
|
COLLATE 'utf8mb4_general_ci'
|
||||||
");
|
");
|
||||||
$connection->close();
|
$connection->close();
|
||||||
}));
|
}));
|
||||||
|
@ -268,6 +268,9 @@ class MysqlArray implements DbArray
|
|||||||
`ts` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
`ts` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`key`)
|
PRIMARY KEY (`key`)
|
||||||
)
|
)
|
||||||
|
ENGINE = InnoDB
|
||||||
|
CHARACTER SET 'utf8mb4'
|
||||||
|
COLLATE 'utf8mb4_general_ci'
|
||||||
");
|
");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user