Deployment Error - Digital Ocean

Solved
rogeryelvington

Apr 13th, 2022 08:27 AM

Hi Guys! After deployment we are getting this error, which is keeping a lot of the WAVE saas functionality from operating correctly (ie: when we try to create a new user, or add a notification).

Here is the error: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "pages_pkey" DETAIL: Key (id)=(1) already exists. (SQL: insert into "pages" ("title", "excerpt", "body", "slug", "meta_description", "meta_keywords", "status", "image", "author_id", "updated_at", "created_at") values (sadf, asdf,

asdf

, sadf, asdf, asdf, INACTIVE, ?, 1, 2022-04-13 14:59:34, 2022-04-13 14:59:34) returning "id")

Any advice? Thank you!

SQLSTATE-23505-Unique-violation-7-ERROR-duplicate-key-value-violates-unique-constraint-announcements_pkey-DETAIL-Key-id-2-already-exists-SQL-insert-into-announcements-title-description-body-updated_at-crea.png

bobbyiliev

Apr 13th, 2022 10:39 AM

Best Answer

Hi there Roger,

Ah yes, I've seen that in the past. Seems like the fix was not merged.

I will submit a new PR with a fix for this soon. But in the mean time, you can get the changes from this commit here:

Fix pgsql sequence after seeding

Commit that and make a new deployment.

This bug only affects Postgres.

Let me know how it goes!

Report
1
rogeryelvington

Apr 13th, 2022 10:53 AM

Thank you, we will check it out - much appreciated :)

bobbyiliev

Apr 17th, 2022 12:51 PM

Just submitted a PR for that too 🙌

https://github.com/thedevdojo/wave/pull/45