Try to use "string" instead of "text"
bio: { type: string }
Frage
I want a column in my database to be of type text (an unlimited amount of text).
In my schema:
bio: { type: text }
Migration file generated:
$this->changeColumn('organization', 'bio', 'text', '', array());
When I try to migrate I get the following error:
- SQLSTATE[42000]: Syntax error or access violation: 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 ')' at line 1. Failing Query: "ALTER TABLE organization CHANGE bio bio text()"
What is the correct syntax for such a field?
Lösung
Try to use "string" instead of "text"
bio: { type: string }