database_cleaner-active_record
database_cleaner-active_record copied to clipboard
For PG truncate, fetch last_value from sequence
With HEAD, receiving ERROR: currval of sequence ...
given currval isn't defined until nextval is invoked 'per session'.
https://www.postgresql.org/docs/current/functions-sequence.html
Therefore looking up what's been persisted whether it was atomically incremented via nextval or manual shifted by something else.