Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

[WIP] Find a fix for PostgreSQL sequences after PUT forcing record id #45

Closed
wants to merge 1 commit into from

Conversation

leplatrem
Copy link
Contributor

This would probably imply to use UUID instead of SERIAL for records ids.

cursor.execute('SELECT MAX(id) AS max FROM records;')
max_id = cursor.fetchone()['max']
bump_serial = """
ALTER SEQUENCE records_id_seq RESTART WITH %s;"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to use UUID here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this was late yesterday night, I hate this and this does not work at all :)

@leplatrem
Copy link
Contributor Author

Replaced by @ametaireau in #70

@leplatrem leplatrem closed this Mar 5, 2015
@leplatrem leplatrem deleted the fix_sequence_put branch April 7, 2015 11:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants