I have a requirement to use an (existing) mysql 5....
# ory-selfhosting
b
I have a requirement to use an (existing) mysql 5.7.39 instance to back Keto. migrations were fine on mysql:8.0 and postgres:14, but with mysql:5.7.39,
keto migrate up --yes
gives the below sql error. can I confidently report keto doesn’t support 5.7?
Copy code
DEBU[2022-12-12T22:12:44Z] Migration has not been applied but it might be a legacy migration, investigating.  audience=application service_name=Ory Keto service_version=v0.10.0-alpha.0 version=20220513200400000001
DEBU[2022-12-12T22:12:44Z] Migration has not yet been applied, running migration.  audience=application service_name=Ory Keto service_version=v0.10.0-alpha.0 version=20220513200400000001
DEBU[2022-12-12T22:12:44Z] 0.3320 seconds                                audience=application service_name=Ory Keto service_version=v0.10.0-alpha.0
Could not apply migrations: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONSTRAINT keto_uuid_mappings_chk_1' at line 1
error executing migrations/sql/20220513200400000001_uuid-mapping-remove-check.mysql.up.sql, sql: ALTER TABLE keto_uuid_mappings DROP CONSTRAINT keto_uuid_mappings_chk_1;
m
Facing the same issue for mysql Ver 15.1 Distrib 10.3.37-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 is this DB not suported? Thanks in Advance
e
m
Yes Thanks for replying I installed mysql version 8.x.x it worked seamlessly
s
I have this issue too with
MySQL 5.7
which is listed as supported on that page, however that page is actually for Hydra not Keto. We have a working installation of Keto
v0.9.0
but with
v0.10.0
there appears to be a new historic migration that's been added.
Copy code
v0.9.0
Current status:
Version			Name				Status	
20150100000001000000	networks			Applied	
20201110175414000000	relationtuple			Applied	
20201110175414000001	relationtuple			Applied	
20210623162417000000	relationtuple			Applied	
20210623162417000001	relationtuple			Applied	
20210914134624000000	legacy-cleanup			Applied	
20220217152313000000	nid_fk				Applied	
20220512151000000000	indices				Applied	
20220513200300000000	create-intermediary-uuid-table	Applied	
20220513200400000000	create-uuid-mapping-table	Applied	
20220513200500000000	migrate-strings-to-uuids	Applied	
20220513200600000000	drop-old-non-uuid-table		Applied	
20220513200600000001	drop-old-non-uuid-table		Applied	
All migrations are already applied, there is nothing to do.
Copy code
v0.10.0
Current status:
Version			Name				Status	
20150100000001000000	networks			Applied	
20201110175414000000	relationtuple			Applied	
20201110175414000001	relationtuple			Applied	
20210623162417000000	relationtuple			Applied	
20210623162417000001	relationtuple			Applied	
20210914134624000000	legacy-cleanup			Applied	
20220217152313000000	nid_fk				Applied	
20220512151000000000	indices				Applied	
20220513200300000000	create-intermediary-uuid-table	Applied	
20220513200400000000	create-uuid-mapping-table	Applied	
20220513200400000001	uuid-mapping-remove-check	Pending	<----- New migration who dis?
20220513200500000000	migrate-strings-to-uuids	Pending	
20220513200600000000	drop-old-non-uuid-table		Pending	
20220513200600000001	drop-old-non-uuid-table		Pending	
Applying migrations...
Could not apply migrations: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONSTRAINT keto_uuid_mappings_chk_1' at line 1
error executing migrations/sql/20220513200400000001_uuid-mapping-remove-check.mysql.up.sql, sql: ALTER TABLE keto_uuid_mappings DROP CONSTRAINT keto_uuid_mappings_chk_1;
s
theoretically, if we are only talking about one minor syntax problem in one migration, you could checkout the release locally from git and change that migration to make it work but this is obviously not recommended or supported from our side... there will likely be other problems later on as well, so updating mysql is the more sustainable fix
👍 1