MySQL migration fails: column 'cert_data' used in key specification without a key length
mardu opened this issue · comments
Checklist
- I could not find a solution in the existing issues or docs.
- I agree to follow this project's Code of Conduct.
Describe the bug
Trying to run migration for MySQL version 8.4.0 fails with error:
error executing migrations/20230915111552_create_saml_certs.up.fizz, sql: CREATE TABLE `saml_certificates` (
`id` char(36) NOT NULL,
PRIMARY KEY(`id`),
`cert_data` text NOT NULL,
`cert_key` text NOT NULL,
`encryption_key` VARCHAR (255) NOT NULL,
`created_at` DATETIME NOT NULL,
`updated_at` DATETIME NOT NULL
) ENGINE=InnoDB;
CREATE INDEX `saml_certificates_cert_data_idx` ON `saml_certificates` (`cert_data`);: Error 1170 (42000): BLOB/TEXT column 'cert_data' used in key specification without a key length
Reproducing the bug
Run hanko-migrate
service with docker for MySQL version 8.4.0
Logs
2024/06/17 13:10:31 error executing migrations/20230915111552_create_saml_certs.up.fizz, sql: CREATE TABLE `saml_certificates` (
`id` char(36) NOT NULL,
PRIMARY KEY(`id`),
`cert_data` text NOT NULL,
`cert_key` text NOT NULL,
`encryption_key` VARCHAR (255) NOT NULL,
`created_at` DATETIME NOT NULL,
`updated_at` DATETIME NOT NULL
) ENGINE=InnoDB;
CREATE INDEX `saml_certificates_cert_data_idx` ON `saml_certificates` (`cert_data`);: Error 1170 (42000): BLOB/TEXT column 'cert_data' used in key specification without a key length
Configuration
database:
user: root
password: xxxxxxxxxx
host: mysql
port: 3306
dialect: mysql
database: hanko
smtp:
host: "mailslurper"
port: "2500"
passcode:
email:
from_address: no-reply@hanko.io
secrets:
keys:
- abcedfghijklmnopqrstuvwxyz
service:
name: Hanko Authentication Service
webauthn:
relying_party:
origins:
- "http://localhost:8888"
session:
cookie:
secure: false # is needed for safari, because safari does not store secure cookies on localhost
server:
public:
cors:
allow_origins:
- "http://localhost:8888"
Hanko Version
OS Hanko Backend
None
OS Version Hanko Backend
No response
OS
None
OS Version
No response
Browser Version
No response
Environment
Docker Compose
Additional Context
No response