Back

Failed to add attribute

  • 0
  • Web
Ashish
9 Jan, 2025, 15:35

The attribute is not seems active, so I delete it and recreate the attribute by the same name "userId" but end up getting this error: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'userId'

TL;DR
Developers are unable to add an attribute due to an inactive attribute issue. After deleting and recreating the attribute with the same name 'userId,' an error arises indicating a duplicate column name. This error occurs because the column 'userId' already exists in the database. The solution is to check the database schema and ensure the attribute is not already present before attempting to recreate it.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more