Skip to content

Commit

Permalink
Merge pull request #11 from kdambekalns/task/fix-mysql-charset
Browse files Browse the repository at this point in the history
TASK: Use utf8mb4 for queue table on MySQL/MariaDB
  • Loading branch information
daniellienert authored Oct 27, 2019
2 parents 4a24f41 + 220a27d commit 1675a7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/Queue/DoctrineQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function setUp(): void
$createDatabaseStatement = "CREATE TABLE IF NOT EXISTS {$this->connection->quoteIdentifier($this->tableName)} (id SERIAL PRIMARY KEY, payload TEXT NOT NULL, state VARCHAR(255) NOT NULL, failures INTEGER NOT NULL DEFAULT 0, scheduled TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL)";
break;
default:
$createDatabaseStatement = "CREATE TABLE IF NOT EXISTS {$this->connection->quoteIdentifier($this->tableName)} (id INTEGER PRIMARY KEY AUTO_INCREMENT, payload LONGTEXT NOT NULL, state VARCHAR(255) NOT NULL, failures INTEGER NOT NULL DEFAULT 0, scheduled DATETIME DEFAULT NULL) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB";
$createDatabaseStatement = "CREATE TABLE IF NOT EXISTS {$this->connection->quoteIdentifier($this->tableName)} (id INTEGER PRIMARY KEY AUTO_INCREMENT, payload LONGTEXT NOT NULL, state VARCHAR(255) NOT NULL, failures INTEGER NOT NULL DEFAULT 0, scheduled DATETIME DEFAULT NULL) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB";
}
$this->connection->exec($createDatabaseStatement);
$this->connection->exec("CREATE INDEX state_scheduled ON {$this->connection->quoteIdentifier($this->tableName)} (state, scheduled)");
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Implements concrete Queue for the doctrine work queue. Requires the packages flowpack/jobqueue-common to be installed.",
"license": "MIT",
"require": {
"neos/flow": "^4.0 || ^5.0 || ^6.0",
"neos/flow": "^5.0 || ^6.0",
"flowpack/jobqueue-common": "^3.0 || dev-master"
},
"autoload": {
Expand Down

0 comments on commit 1675a7a

Please sign in to comment.