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
"Invalid Input Data Please Verify Unique Constraints " after migrating from OneClick to AWS #9369
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@Tej-Bains
We issued a release in v3.5.0 last week that should address this, can you try updating and see if that fixes your issue? |
I was getting this error because of a mismatch in package versions. During my deploy I switched the upload provider from |
I updated to last version 3.5.x and fixed the issue |
Marking as closed as two confirmations stated it's fixed. |
I have the same issue with 3.6.1.
because Strapi does not remove the data associated to the field. Which could be a good opt-in by the way: "do you want to remove the data associated to the field you're deleting?" I will try to go directly into the DB to fix the issue (and update my post) |
This is a "by design" Postgress issue that occurs when you mass import. To solve it; SELECT MAX(the_primary_key) FROM the_table; Do this across all affected tables. |
I should have mentioned it's a mongoDB project! |
I am still facing this issue on 3.6.6 in postgresql. |
Thanks it helped me! |
I'm new to sequel and had this same error. I'm using TablePlus Query area to input this - could you maybe offer some explanation into what its doing & why it (could) work |
@coderdix When you import the database you need to reset the sequence for each table. What the above script does is increase the sequence id by 1 from the last record in your table. The next time you save, the updated sequence will be the id and auto increased by one. I hope I have not confused you even more. You can DM me on Twitter @shadracnicholas in case this explanation doesn't seem to make sense. |
today I faced this issue as well. 10/3/2021 |
@ahmadjoya You are using Postgress as your database? |
I had the same issue and found that it was a custom utility function producing uncaught errors. |
Me too, after I cloned an entity (and changed every field) I get the same issue. |
Double check your server console as that error is more of a database "catch-all" in v3 and the issue will have more details in the server log. |
I also had this problem. I was using an existing DB that had a UUID based primary key. Strapi only supports integer primary keys for tables that are modified using Strapi. If you don't ever use relations or image fields you won't have a problem. If you add a relation or photo field - Strapi will automatically use an integer for the reference regardless of the actual PK field type. I.e., if you have an article table with UUID PK and add an image field, the DB upload table will set the reference field to Int4, making it throw this error. To fix this – make sure all of your PK fields are Integers. |
Can you explain how to change this? I'm having the same issue and think this might be it. |
Resolved my problem, thx @shadracnicholas, further informations here: |
I also have a same issue. |
Works like a charm✌✌ |
I'm new to the postgres. So can any one tell me, "Where Should I execute this query ?" as in strapi we can't do this and if it has to be done in postgres (pgAdmin) in which section it has be done, as I'm trying to do this in query editor but It is not helping me in any way.😫😫 Any video link document will help. |
This issue has been mentioned on Strapi Community Forum. There might be relevant details there: https://forum.strapi.io/t/getting-400-error-while-adding-data/20449/1 |
This issue has been mentioned on Strapi Community Forum. There might be relevant details there: https://forum.strapi.io/t/invalid-input-data-please-verify-unique-constraints/20533/1 |
Bug report
Describe the bug
Moved my strapi build from digitaloceans one click service to aws self-installed strapi on ubuntu 18. with postgres rds.
Database was migrated using aws datamigration service. Content was successfully migrated. There were some initial errors, but repeat of the process with truncate enabled allowed the database to be moved successfully.
Strapi is showing the data, but when trying to edit the migrated content you get met with the error "Invalid Input Data Please Verify Unique Constraints ".
Steps to reproduce the behaviour
Expected behavior
No error and successful edit of the fields.
System
Additional context
from the backside the postgres database is giving a 400 error. But if i were to add a item to the collection content, then that item works fine. I just cant edit or change SOME fields in the cms for content that was migrated over.
Ive tried with node_env to both dev and production.
ive tried strapi development mode.
ive tried strapi production.
ive tried updating all the npm packages and updating to latest strapi build.
still getting the same error.
is this issue related to security groups on aws? or the s3 bucket for file uploads?
any help is appreciated.
The text was updated successfully, but these errors were encountered: