rodauth-rails 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/generators/rodauth/migration_generator.rb +12 -2
- data/lib/rodauth/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f29cbaceb49208cac659dd31cbfcb874bf0df2c3b6b0133680f75904ab07a578
|
4
|
+
data.tar.gz: 2c9c7ed9e5d91428f15058274c0896298402e93d22a94c90c7d127e33699a1a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 546070f740b95f26d8f29b632672339215383737e9b6497c64d613c3c07929052477022a4e70051254d267a037c7b794448674aa99927d26edb4322cf274f778
|
7
|
+
data.tar.gz: 638ecc60b072197c490180a8241ed5af02ed3d6114f3cf5aa2e621ced9296e175d6d5b579543e43d23283164d3193551eb68efd54b2ef3b68cb79f49462397d8
|
data/CHANGELOG.md
CHANGED
@@ -110,9 +110,19 @@ module Rodauth
|
|
110
110
|
|
111
111
|
def current_timestamp
|
112
112
|
if ActiveRecord.version >= Gem::Version.new("5.0")
|
113
|
-
%(-> { "
|
113
|
+
%(-> { "#{current_timestamp_literal}" })
|
114
114
|
else
|
115
|
-
%(OpenStruct.new(quoted_id: "
|
115
|
+
%(OpenStruct.new(quoted_id: "#{current_timestamp_literal}"))
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# Active Record 7+ sets default precision to 6 for timestamp columns,
|
120
|
+
# so we need to ensure we match this when setting the default value.
|
121
|
+
def current_timestamp_literal
|
122
|
+
if ActiveRecord.version >= Gem::Version.new("7.0") && activerecord_adapter == "mysql2" && ActiveRecord::Base.connection.supports_datetime_with_precision?
|
123
|
+
"CURRENT_TIMESTAMP(6)"
|
124
|
+
else
|
125
|
+
"CURRENT_TIMESTAMP"
|
116
126
|
end
|
117
127
|
end
|
118
128
|
else # Sequel
|