12345678910111213141516171819202122232425262728293031 |
- class DbHelper
- def self.import_post(table = nil)
- return if ActiveRecord::Base.connection_db_config.configuration_hash[:adapter] != 'postgresql'
- tables = if table
- [table]
- else
- ActiveRecord::Base.connection.tables
- end
- tables.each do |t|
- ActiveRecord::Base.connection.reset_pk_sequence!(t)
- end
- end
- end
|