#ER_FK_COLUMN_CANNOT_CHANGE on configuring relation interface

2 messages · Page 1 of 1 (latest)

primal jay
#

Trying Directus (running locally) for the first time (looks awesome, and hoping this fits the bill for an admin tool that works the way I need which has been lacking). I've imported my existing database (MySQL 5.7) with FKs, added a few tables to collections, and went to configure a FK column (uid, pointing to my user's table) by going to interface and enabling "many to one". When I hit the checkmark to save, I get:

[INTERNAL_SERVER_ERROR] alter table `node` modify `uid` int default '0' - ER_FK_COLUMN_CANNOT_CHANGE: Cannot change column 'uid': used in a foreign key constraint 'node_uid_fkey'

(On top of it not working, I'd also expect this to not try to touch my DB schema if I haven't changed anything. I am curious if there's a way I can disable actions that could change the DB schema since that's managed by Prisma to prevent anything from going wrong)

bright lodgeBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please help us help you making sure you:

  • Adding an explanation of exactly what you're trying to achieve.
  • Adding any and all related code or previous attempts.
  • Describing the exact issue or error you are facing.
  • Posting any screenshots if applicable.
  • Reading through https://stackoverflow.com/help/how-to-ask.

When you're done with this thread, please close it. Thanks! ✨

(If you have a support agreement and need help, please contact the core team via email.)