-
Notifications
You must be signed in to change notification settings - Fork 92
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
riverdatabasesql driver inserts empty unique key arrays instead of null #650
Comments
Dang, I think this ends up being a case where the migration isn't fully reversible if there's existing data conflicting with the index. 🤔 For performing the reverse migration, it's probably only going to be possible if you first clear or finish processing the existing unique jobs. I'm not sure if there's anything that can be done to make this cleaner—really I wish we had just gotten this more flexible unique jobs implementation in the first place. |
@bgentry Is this possibly indicative of a bug or at least unexpected behavior? If we were to be storing an empty byte array, that probably means there wasn't supposed to be any unique considerations, and I would've expected that to a |
@brandur most likely yes, wish I had thought about that before. As I've verified this extensively on the pgx driver (just checked a long running live installation locally) it's probably something specific to dbsql. |
@brandur it seems to be that the |
Ah dang it. Yeah, that |
River migration 6 down fails in river 0.13.0, at least when using the
riverdatabasesql
driver, when there are periodic jobs in the job table. It fails with the following message:The relevant line from the migration is here:
river/riverdriver/riverdatabasesql/migration/main/006_bulk_unique.down.sql
Line 11 in 56ddf09
It appears that the periodic jobs, rather than have their unique key set to
NULL
, instead just have an empty byte array (\x
). As a result, they violate the unique constraint. Perhaps this was different in past versions of river?The text was updated successfully, but these errors were encountered: