You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into a bug (https://gitlab.lunorian.is/snippets/177) caused by the ID in my database being out of sequence as I copied stuff over from my development environment database onto the server (which probably wasn't the best way to migrate in retrospect). That said I later encountered a bug preventing me from adding versions since the ID it was trying to use was taken. It gave me a difficult to understand error message (01:06:15 Granite | (ERROR) Save Exception: duplicate key value violates unique constraint "versions_pkey") the other thing I know for sure is its trying to save with a key that's already taken. Ideally it would both tell me the exact id its trying to use, and then ask me is the id out of sequence or something so I as a developer know what to look for.
The text was updated successfully, but these errors were encountered:
This is a bit outside the scope of Granite. It's not really Granite's responsibility to make sure the underlying database was setup properly, or resolve issues related to it.
@nsuchy with that said, looks like the auto increment value is not properly set on the new db. Consider setting it to the max(id) + 1. Here is how you would do that for MySQL: ALTER TABLE tablename AUTO_INCREMENT = 1234
Sorry @drujensen, this issue was a followup to an issue he had that was resolved in the amber chat on Gitter. Issue was a DB migration he did, didn't include the sequence for the table from dev to prod. Thus the PKs were overlapping, causing the error.
I ran into a bug (https://gitlab.lunorian.is/snippets/177) caused by the ID in my database being out of sequence as I copied stuff over from my development environment database onto the server (which probably wasn't the best way to migrate in retrospect). That said I later encountered a bug preventing me from adding versions since the ID it was trying to use was taken. It gave me a difficult to understand error message
(01:06:15 Granite | (ERROR) Save Exception: duplicate key value violates unique constraint "versions_pkey")
the other thing I know for sure is its trying to save with a key that's already taken. Ideally it would both tell me the exact id its trying to use, and then ask me is the id out of sequence or something so I as a developer know what to look for.The text was updated successfully, but these errors were encountered: