-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: SQLITE_ERROR: duplicate column name: event #3490
Comments
@Gribbs always make a backup, and short answer is no, you will need to go clean up the DB. I recommend getting a GUI client depending on your OS: Linux: DBeaver |
Also @Gribbs I removed a link to your DB file as it contains your email and an encrypted form of your password. Never a good idea to share that stuff on the internet as it allows for someone to offline try and crack the password. |
thanks @derrickmehaffy |
It's a well known issue that only happens on SQLite which shouldn't even be used in production so it wasn't deemed as a priority fix. It stems from the fact that SQLite doesn't have a proper Basically what has to be done is it makes a copy of the model, copies the data with the rename change, deletes the old one and renames the table. With data in the mix, it's possible to have a duplicate if the old table wasn't deleted first. |
Your best bet is to preform the column rename yourself manually, or delete the table and let Strapi recreate it. Either way marking this as closed for now, as the issue is well documented. |
thanks for the advice @derrickmehaffy |
This can be solved locally by modifying the database settings file. Ex: api/product/models/Product.settings.json |
Thanks 👍 @scottnorland this works, but it just takes you back to the original column name. |
Where is the SQLite file located? |
Hello @chris-fran , if you check your |
Although this issue is well documented, I think it's good to re-open it. This is only providing a negative experience for those who just want to change the label of their field—a simple change like that shouldn't require the user to look up documentation and figure out what went wrong, it should just work. |
@christopher4lis it all comes down to #1114 locking this as it's a duplicate |
Describe the bug
I've been building out my content-types in the admin ui and somehow I've created a duplicate column and now
strapi develop
command is not working. I get the Error:I've seen in other issues it seems it can be fixed in the .tmp/data.db file but I'm not sure where and afraid to edit it in case I destroy hours of work. Is there an easier way to recover from this?
Any help will be appreciated.
Expected behavior
The server should start and let me correct any error.
Screenshots
If applicable, add screenshots to help explain your problem.
Code snippets
Snip Removing DB file as it contains user private data -DMehaffy
System
The text was updated successfully, but these errors were encountered: