seed-fu 2.3.7 → 2.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/seed-fu/seeder.rb +2 -1
- data/lib/seed-fu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad9b8e7488b40ad21cde92fdca4bcf1b49f0337b
|
4
|
+
data.tar.gz: c959103cfa27bec53d50054105cc434616542c5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 421610d7bbb46e2c7dedb5732e4a4d9c9b90760a655445c3ba397026a93942305c87308480b43863ee925fcca5d2a9bba53e788ae9140620f1b88e481f1b6f95
|
7
|
+
data.tar.gz: 495a61ad3ada421366a699e2943804fc4883e41b03da47b7c431565aa1fada06aaaaa98bee16416d7b86c57c7888ddb27484e8ecb218d01f7ab0ce69b3fa7a8e
|
data/CHANGELOG.md
CHANGED
data/lib/seed-fu/seeder.rb
CHANGED
@@ -91,7 +91,8 @@ module SeedFu
|
|
91
91
|
quoted_id = @model_class.connection.quote_column_name(@model_class.primary_key)
|
92
92
|
sequence = @model_class.sequence_name
|
93
93
|
|
94
|
-
|
94
|
+
# TODO postgresql_version was made public in Rails 5.0.0, remove #send when support for earlier versions are dropped
|
95
|
+
if @model_class.connection.send(:postgresql_version) >= 100000
|
95
96
|
sql =<<-EOS
|
96
97
|
SELECT setval('#{sequence}', (SELECT GREATEST(MAX(#{quoted_id})+(SELECT seqincrement FROM pg_sequence WHERE seqrelid = '#{sequence}'::regclass), (SELECT seqmin FROM pg_sequence WHERE seqrelid = '#{sequence}'::regclass)) FROM #{@model_class.quoted_table_name}), false)
|
97
98
|
EOS
|
data/lib/seed-fu/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seed-fu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bleigh
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-04-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|