What should be a query to the database so that you can create a column for storing tags. I thought that you can do so:

ALTER TABLE `modx_user_attributes` ADD `user_tags` text[] NOT NULL; 

But an error occurred:

Unexpected character. (near "[" at position 55)

Unexpected character. (near "]" at position 56)

# 1064 - You have an error in the request. Check the documentation for the version of MariaDB you are using for correct syntax near '[] NOT NULL' on line 1

  • 3
    MySQL and MariaDB lack a data type such as an array of texts. - Akina
  • and how can this be realized? to add a field with an array of data? - miKZ
  • one
    What do you want ... The ratio of many-to-many? Correct - create a tag table and a link table. But it is possible (clearly understanding the accompanying problems) to have either a text field and store there tags in CSV or XML, or a JSON type field, or, if there are no more than 64 tags, even a SET type field. - Akina

0