Cannot activate Maps in Nextcloud 16.0.4, i get this
[An exception occurred while executing 'CREATE TABLE oc_maps_address_geo (id BIGINT AUTO_INCREMENT NOT NULL, adr VARCHAR(255) NOT NULL, adr_norm VARCHAR(255) NOT NULL, lat DOUBLE PRECISION DEFAULT NULL, lng DOUBLE PRECISION DEFAULT NULL, looked_up TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_4C2424AB9CEC6B64C4BE9D6 (adr, adr_norm), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ENGINE = InnoDB ROW_FORMAT = compressed': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes](url)
Which database version are you using?
5.5.5-10.1.41-MariaDB-0ubuntu0.18.04.1
Same here. I use MariaDB 10.1.38 debian linux
It is in migration Version000009Date20190625000800. The created table is droped anyways in Version000012Date20190703155323.
@eneiluj what is the best solution to get rid of the broken migration?
@copiis @hoergen I'm curious is disabling and then enabling the app working?
@copiis @hoergen I'm curious is disabling and then enabling the app working?
It is not possible to activate the app, the error message already appears during the attempt.
Got the same experience here. The error message appears
This solved the problem
$ sudo mysql -u root -p
MariaDB [(none)]> use nextcloud;
MariaDB [nextcloud]> set global innodb_large_prefix=on;
MariaDB [nextcloud]> set global innodb_file_format=Barracuda;
$ sudo -u www-data php occ maintenance:repair
Still not working after done your steps
An exception occurred while executing 'CREATE TABLE oc_maps_address_geo (id BIGINT AUTO_INCREMENT NOT NULL, adr VARCHAR(255) NOT NULL, adr_norm VARCHAR(255) NOT NULL, lat DOUBLE PRECISION DEFAULT NULL, lng DOUBLE PRECISION DEFAULT NULL, looked_up TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_4C2424AB9CEC6B64C4BE9D6 (adr, adr_norm), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ENGINE = InnoDB ROW_FORMAT = compressed': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
Worked for me:
sudo mysql -u root -p
use nextcloud (your Database name)
SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_file_per_table=ON;
But instead of MariaDB [nextcloud]> I had a mysql>
The last step produced a warning:
sudo -u www-data php occ maintenance:repair
There are no commands defined in the "mainenance" namespace.
But it worked anyways.
Hello.
I Work on a shared server and I cannot use "SET GLOBAL innodb_file_format=Barracuda;"
(Nextcloud 16.0.4 hosted by OVH PHP 7.3.6 MySQL 5.6)
I had to cheat to upgrade NextCloud but I can not manage to install maps
Ok. The last time i tried to install "MAPS" it threw me an error. Today I logged in and saw the menu entry "Maps", clicked on it and it worked. ???
The only thing I did in between was to update all the other apps. I did that as well, when I tried to install maps. All other apps where up to date at that time.
I don't get it why it is working now, but I'm happy it is working now.
@hoergen Maybe the problematic migration step was marked as done at some point so then when you enabled it again it successfully ran all following steps.
@tacruc I think we can solve this by editing the problematic migration script. It won't have any effect on existing installations and will prevent raising the exception on fresh app installs when this old migration step is executed. I don't see what the problem is in Version000009Date20190625000800 though :grin:. The bigint id is declared the same way in Version000012Date20190703155323. Why exactly does MySQL complain?
If I remeber it correctly it is declared as unique index in Version000009Date20190625000800
And in Version000012Date20190722184716 it is just an index. The problem is the ADR and ADR_norm field. At least what I would guess.
I have the same problem
Nextclpoud 15.0.12
Worked for me too: