activemodel_object_info 0.2.0 → 0.3.0
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6da83d32a95c5c84452dc1d40245e61e1cc1f9302274903c7002021385c7a661
|
|
4
|
+
data.tar.gz: 6a8a19cfda27cedccc39d7cedaa7ce9701dc117060eeff50e19ce82b268a8d5b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3c8b9299eed185bd0abfc9e37cf92dd82d9a3851416f5d64114435b1b7b153b0f7ff9e277ecaec5673e6adec6dd5d9478ec2661489486e58fe4c8d630d399c0
|
|
7
|
+
data.tar.gz: 4f90f6a03ebdebda3184b3393d3edba1b1aa452df0b6c86ebbb84a75d1bcf38205b94f70bd0f28a54897d9c9cb2849a5a669bcb1c24a4c923e9e9820ff409f0c
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
module ActivemodelObjectInfo
|
|
4
4
|
#
|
|
5
5
|
# 重新扩展一些方法,用来方便在创建迁移文件的时候进行一些通用类的设定。
|
|
6
|
+
# 从 @version 0.3.0 开始支持了自动创建的时间戳字段增加索引
|
|
6
7
|
#
|
|
7
8
|
# @author shiner527 <shiner527@hotmail.com>
|
|
8
9
|
#
|
|
@@ -54,7 +55,7 @@ module ActivemodelObjectInfo
|
|
|
54
55
|
# 如果要生成操作时间戳信息
|
|
55
56
|
if with_timestamp
|
|
56
57
|
timestamp_column_name = timestamp_prefix.to_s + field.to_s + timestamp_suffix.to_s
|
|
57
|
-
column(timestamp_column_name, :datetime, comment: '操作时间戳') if timestamp_column_name.present?
|
|
58
|
+
column(timestamp_column_name, :datetime, index: true, comment: '操作时间戳') if timestamp_column_name.present?
|
|
58
59
|
end
|
|
59
60
|
end
|
|
60
61
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activemodel_object_info
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- shiner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-11-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
185
185
|
- !ruby/object:Gem::Version
|
|
186
186
|
version: '0'
|
|
187
187
|
requirements: []
|
|
188
|
-
rubygems_version: 3.
|
|
188
|
+
rubygems_version: 3.4.10
|
|
189
189
|
signing_key:
|
|
190
190
|
specification_version: 4
|
|
191
191
|
summary: Build a hash based on active record attributes.
|