Skip to content

Instantly share code, notes, and snippets.

View weggesser's full-sized avatar
:octocat:
coding

Sebastian Weggesser weggesser

:octocat:
coding
View GitHub Profile
@weggesser
weggesser / reset-pg-pk.rb
Last active January 25, 2018 09:03
Reset PG PK sequences in rails console
ActiveRecord::Base.connection.tables.each { |t| ActiveRecord::Base.connection.reset_pk_sequence!( t ) }
### Keybase proof
I hereby claim:
* I am weggesser on github.
* I am wofkl (https://keybase.io/wofkl) on keybase.
* I have a public key ASDTus_lR3yN1_WEDiooQxsY8LWPO9e-1zvu0-mPgIdj6wo
To claim this, I am signing this object: