solidus_brazilian_adaptations 1.3.3 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d7b0a16447069c50e70754bd6cd045edcbcc062f35a2d09c068b769b668585e
|
4
|
+
data.tar.gz: 1ea80df0ab3defa536732a249ba059ffe454cc9542723ea3200fbd372f75fa20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da111c206d4607aed9a6c54103a66cf89e58ed4dc6bc54d8b63a337e2427de750a444bd9a6ab886451619bf27bd78be4d2ee954dfa2457a85e1e6e094efa169e
|
7
|
+
data.tar.gz: 28ac58bc40a73c0b779b6dea1c60839b815e9a6ede135cad3aa659c037d69f7c5a1a355233866fa4fd0a93dac527bf14b5e175a7a968bc068243a88be50c4f6d
|
@@ -1,6 +1,18 @@
|
|
1
1
|
class ChangeTypeMinAndMaxDeliveryTime < ActiveRecord::Migration[7.1]
|
2
2
|
def change
|
3
|
-
|
4
|
-
|
3
|
+
if column_type(:spree_shipping_rates, :min_delivery_time) == :integer
|
4
|
+
change_column :spree_shipping_rates, :min_delivery_time, "timestamp USING to_timestamp(min_delivery_time)"
|
5
|
+
end
|
6
|
+
|
7
|
+
if column_type(:spree_shipping_rates, :max_delivery_time) == :integer
|
8
|
+
change_column :spree_shipping_rates, :max_delivery_time, "timestamp USING to_timestamp(max_delivery_time)"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
# Helper para checar o tipo da coluna
|
15
|
+
def column_type(table, column)
|
16
|
+
connection.columns(table).find { |c| c.name == column.to_s }.sql_type_metadata.type
|
5
17
|
end
|
6
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_brazilian_adaptations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ulysses-bull
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|