Heroku - Error run seeder for popular BD

Asked

Viewed 23 times

0

Hello.

I recently deployed an application to Heroku (Node + Adonis + Mysql + React) and I am facing some problems. It has an admin user who is responsible for registering other users, so I have some seeders to popular the database with some data and users (admin and common user). To run the seeders in Heroku I used the following command.

heroku run -a allocate-ufc-back ENV_SILENT=true node ace seed --force

After using this command it generates the following error:

Print do erro

It’s like there’s no column or something, at least that’s what I understood. I don’t know how to view the tables of my bank in Heroku so I can’t tell if it is connecting properly. If anyone could help me identify what the problem is or tell me how to run the seeders correctly, I would be very grateful. Detail: Migrations were executed normally.

1 answer

1

You’re going through the same trouble as this situation here. The error is how you are using the foreign key/index ratio of your tables in the database.

A foreign key relationship involves a parent table that contains the initial values of the column and a child table with column values that refer to the values of the parent column. A foreign key constraint is defined in the child table.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.