Creating new entry in a collection which has a trigger in database

System Information
  • Strapi Version: 3.6.0
  • Operating System: Windows
  • Database: MySQL
  • Node Version: 14.16.1
  • NPM Version: 6.14.12
  • Yarn Version: not using

I have a problem when I try to insert a new entry into a collection called ‘Matches’.
The problem happens because I need to have a trigger in my database on the table that’s represented by this collection. In the trigger I’m checking some stuff regarding homeId and awayId for the newly entered row.
Error I’m getting in the console is the following:

[2021-05-01T00:28:15.468Z] error Error: insert into match (created_at, date, time, updated_at) values (‘2021-05-01 02:28:15.461’, ‘2021-05-08’, ‘01:00:00.000’, ‘2021-05-01 02:28:15.461’) - ER_BAD_FIELD_ERROR: Unknown column ‘t.teamId’ in ‘where clause’

From what I can see there, strapi is not trying to insert values for columns homeId and awayId, giving me an error because the trigger needs to do it’s stuff before inserting happens.

Please help me, I have no idea what to do.

Relevant scripts:

Inserting into table match through a query in MySQL WB works fine, but when done through strapi it doesn’t work.

This can be closed, i resolved the issue.
I somehow deleted the column in a table where trigger was supposed to insert, was too tired at that moment to realize.

No need to close anything as this is just a forum post :stuck_out_tongue: