The column 'account_id' on table 'account_account' already exists
Collapse
X
-
In this case, try to find the extra field and link in custom/Espo/Custom/Resources/metadata/entityDefs/Account.json yourself. Or you can archive this file and add it as an attachment in the next post. -
-
A similar topic was discussed here: https://forum.espocrm.com/forum/bug-...already-exists.
In your case, it seems that you mistakenly created a Many-to-Many relationship between Account and Account. Then you deleted this Relationship, but the account_account table was not deleted from the database and you still have some data in it.
You can wait for a response from someone more experienced, or try to make a backup: https://docs.espocrm.com/administrat...p-and-restore/, and then manually delete the account_account table via phpMyAdmin or its analogue from your database.
If that doesn't help, you can always restore the data.Leave a comment:
-
-
The column 'account_id' on table 'account_account' already exists
When i try to rebuild i get the error
Error 500: Error while rebuilding database. See log file for details.
In logs i see
[2025-02-20 10:41:28] Espo.ERROR: Fault to rebuild database schema. Details: The column 'account_id' on table 'account_account' already exists. [] []
[2025-02-20 10:41:28] Espo.ERROR: API [POST]:/Admin/rebuild, Params:Array ( ) , InputData: - Error while rebuilding database. See log file for details. [] []
[2025-02-20 10:41:28] Espo.ERROR: Display Error: Error while rebuilding database. See log file for details., Code: 500 URL: /cal/api/v1/Admin/rebuild [] []
How can i resolve this?Tags: None

Leave a comment: