Attempting to install new Directus site but fails at database creation. Used to work on same server. Think this is a bug recently introduced.
Latest commit is, commit eb93d96756de9c7805ed12d249f21eabc94620b6 on May 3
Directus installs.
SQL Error.
`[2019-05-09 10:17:39] api[].ERROR: PDOException: SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. in /home/collection/directus/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:134
Stack trace:
I have the same problem.
The issue is that MariaDB 10.1 (which is the last version through official Ubuntu repository) is based on MySQL 5.5 which is not supported anymore by Directus.
You have two possibilities :
Yep - I've just realised that Ubuntu 18.04 comes with an ancient version of MariaDB for some reason.
I'm just attempting to "upgrade" to MySQL 5.7 but it's all going wrong. I'll report back when I've persuaded MySQL to work properly.
Yep - installs fine with 5.7.
For the casual reader... Ubuntu 18.04LTS comes with MariaDB 10.1 which is really old and not supported by Directus. If, like me, you have a bunch of existing databases you don't want to loose this turns into hassle. It's not entirely straightforward 'upgrading' to MySQL 5.7.
Yeah, the main problem is that MySQL 5.5 is outdated but MariaDB 10.1 isn't (even if quit old).
But as Directus doesn't officially support MariaDB, we can't blame them ;)
So either use MySQL (probably the best option for casual user) or be prepared to upgrade more often your MariaDB instance from their repository directly.
Just a follow-up to confirm that upgrading MariaDB to version 10.3 fixes this problem, for those who want to keep MariaDB (at your own risk ;) ).
I'm closing this as this issue resolve with MySQL 5.7
I upgraded to MariaDB 10.4 and it works fine now !
https://computingforgeeks.com/install-mariadb-10-on-ubuntu-18-04-and-centos-7/
Hi, as a workaround you could change the index idx_user_collection_title to only include the 'user' column instead of 'user', 'collection', 'title'.
Change in migrations/install/20180220023152_create_collections_presets_table.php
to (line 58):
$table->addIndex(['user'], [
'unique' => true,
'name' => 'idx_user_collection_title'
]);
Most helpful comment
Yeah, the main problem is that MySQL 5.5 is outdated but MariaDB 10.1 isn't (even if quit old).
But as Directus doesn't officially support MariaDB, we can't blame them ;)
So either use MySQL (probably the best option for casual user) or be prepared to upgrade more often your MariaDB instance from their repository directly.