From 220a27dce2935f2230845f6a76af8d1052467147 Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns Date: Tue, 24 Sep 2019 14:26:24 +0200 Subject: [PATCH] TASK: Use utf8mb4 for queue table on MySQL/MariaDB Raises the minimum Flow version to 5.0 (to match the utf8mb4 charset.) --- Classes/Queue/DoctrineQueue.php | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Queue/DoctrineQueue.php b/Classes/Queue/DoctrineQueue.php index d7f4fe8..cd9f106 100644 --- a/Classes/Queue/DoctrineQueue.php +++ b/Classes/Queue/DoctrineQueue.php @@ -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)"); diff --git a/composer.json b/composer.json index 94ce0fc..9eb0dda 100644 --- a/composer.json +++ b/composer.json @@ -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": {