]>
BookStack Code Mirror - bookstack/blobdiff - app/Console/Commands/UpgradeDatabaseEncoding.php
projects
/
bookstack
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added additional testing for editor switching permissions
[bookstack]
/
app
/
Console
/
Commands
/
UpgradeDatabaseEncoding.php
diff --git
a/app/Console/Commands/UpgradeDatabaseEncoding.php
b/app/Console/Commands/UpgradeDatabaseEncoding.php
index a17fc952351df5103709c0c2406f8287ac140215..32808729a545a47904457cb7af9bb67f557178e9 100644
(file)
--- a/
app/Console/Commands/UpgradeDatabaseEncoding.php
+++ b/
app/Console/Commands/UpgradeDatabaseEncoding.php
@@
-23,7
+23,6
@@
class UpgradeDatabaseEncoding extends Command
/**
* Create a new command instance.
/**
* Create a new command instance.
- *
*/
public function __construct()
{
*/
public function __construct()
{
@@
-44,12
+43,12
@@
class UpgradeDatabaseEncoding extends Command
$database = DB::getDatabaseName();
$tables = DB::select('SHOW TABLES');
$database = DB::getDatabaseName();
$tables = DB::select('SHOW TABLES');
- $this->line('ALTER DATABASE `'
.$database.
'` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
- $this->line('USE `'
.$database.
'`;');
+ $this->line('ALTER DATABASE `'
. $database .
'` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
+ $this->line('USE `'
. $database .
'`;');
$key = 'Tables_in_' . $database;
foreach ($tables as $table) {
$tableName = $table->$key;
$key = 'Tables_in_' . $database;
foreach ($tables as $table) {
$tableName = $table->$key;
- $this->line('ALTER TABLE `'
.$tableName.
'` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
+ $this->line('ALTER TABLE `'
. $tableName .
'` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
}
DB::setDefaultConnection($connection);
}
DB::setDefaultConnection($connection);