TBD54566975 / dwn-server

DWN server - host anywhere publicly accessible for DIDs to use
Apache License 2.0
38 stars 41 forks source link

code: 'ER_BLOB_KEY_WITHOUT_LENGTH', when using MySql for persistent storage config #152

Open AnonymityAdvoc8 opened 1 month ago

AnonymityAdvoc8 commented 1 month ago

When updating the persistent storage config to use MySQL and run the server for the first time, it does it's migration and fails when creating the registeredTenants table.

code: 'ER_BLOB_KEY_WITHOUT_LENGTH', errno: 1170, sqlState: '42000', sqlMessage: "BLOB/TEXT column 'did' used in key specification without a key length", sql: 'create table if not exists registeredTenants (did text primary key, termsOfServiceHash text)'

Solution was to create the table manual and let the rest of the migration run:

CREATE TABLE IF NOT EXISTS registeredTenants ( did VARCHAR(255) PRIMARY KEY, termsOfServiceHash TEXT );