canove / whaticket-community

A very simple Ticket System based on WhatsApp messages, that allow multi-users in same WhatsApp account.
MIT License
1.52k stars 776 forks source link

Issue with MariaDB on sequelize migrate #562

Open Lermacto opened 11 months ago

Lermacto commented 11 months ago

Hello! I've been following the readme to setup the application. I've found that if you choose 'mariadb' as the dialect on the backend enviroment file it leads to an error when running 'npx sequelize db:migrate'. The output is as follows:

whaticket-dev@whaticket-dev:~/whaticket-community/backend$ npx sequelize db:migrate

Sequelize CLI [Node: 12.22.9, CLI: 5.5.1, ORM: 5.22.5]

Loaded configuration file "dist/config/database.js".
== 20200717133438-create-users: migrating =======
== 20200717133438-create-users: migrated (0.037s)

== 20200717144403-create-contacts: migrating =======
== 20200717144403-create-contacts: migrated (0.019s)

== 20200717145643-create-tickets: migrating =======
== 20200717145643-create-tickets: migrated (0.041s)

== 20200717151645-create-messages: migrating =======
== 20200717151645-create-messages: migrated (0.033s)

== 20200717170223-create-whatsapps: migrating =======
== 20200717170223-create-whatsapps: migrated (0.017s)

== 20200723200315-create-contacts-custom-fields: migrating =======
== 20200723200315-create-contacts-custom-fields: migrated (0.028s)

== 20200723202116-add-email-field-to-contacts: migrating =======
== 20200723202116-add-email-field-to-contacts: migrated (0.018s)

== 20200730153237-remove-user-association-from-messages: migrating =======

ERROR: Cannot delete property 'meta' of [object Array]

Choosing 'mysql' as the dialect on the backend enviroment file fixes the issue. I thought since the docker image for the database was mariadb that choosing that dialect would be the obvious option. This is not technically an error but maybe it warrants some clarification on the installation guide.