diff options
author | Divine <48183131+divine@users.noreply.github.com> | 2021-02-02 00:50:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 22:50:33 +0100 |
commit | 22d76bd1a490c2df6f53328c21ad4a65a360741c (patch) | |
tree | c175bf7332fb29bb03e473dd8c9488020ffb8ede /sql | |
parent | Fix bug handling jid:decode/1 return, introduced in cdb286d1d (#3461) (diff) |
Fix specified key was too long (#3513)
* Fix specified key was too long
This adds the correct engine and sets it to utf8mb4 collate. Prevents "Specified key was too long; max key length is 1000 bytes" from happening.
* Make two import SQL files consistent
As suggested by @prefiks
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysql.new.sql | 4 | ||||
-rw-r--r-- | sql/mysql.sql | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sql/mysql.new.sql b/sql/mysql.new.sql index b7aa7c47e..b29a003eb 100644 --- a/sql/mysql.new.sql +++ b/sql/mysql.new.sql @@ -430,7 +430,7 @@ CREATE TABLE push_session ( node text NOT NULL, xml text NOT NULL, PRIMARY KEY (server_host(191), username(191), timestamp) -); +) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE UNIQUE INDEX i_push_session_susn ON push_session (server_host(191), username(191), service(191), node(191)); @@ -502,4 +502,4 @@ CREATE TABLE mqtt_pub ( user_properties blob NOT NULL, expiry int unsigned NOT NULL, UNIQUE KEY i_mqtt_topic_server (topic(191), server_host) -); +) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/sql/mysql.sql b/sql/mysql.sql index 0da45da98..9583aeb2d 100644 --- a/sql/mysql.sql +++ b/sql/mysql.sql @@ -398,7 +398,7 @@ CREATE TABLE push_session ( service text NOT NULL, node text NOT NULL, xml text NOT NULL -); +) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE UNIQUE INDEX i_push_usn ON push_session (username(191), service(191), node(191)); CREATE UNIQUE INDEX i_push_ut ON push_session (username(191), timestamp); @@ -469,4 +469,4 @@ CREATE TABLE mqtt_pub ( user_properties blob NOT NULL, expiry int unsigned NOT NULL, UNIQUE KEY i_mqtt_topic (topic(191)) -); +) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |