activerecord-postgis-adapter 5.1.0 → 5.2.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: a36aaf405da9a1fd4cc773af8bd16504dfbc482ca2c80f0a5a941fbf1d428b7f
|
4
|
+
data.tar.gz: 85fde301aa11100d590e24614b9598f5e5376f2e14a9878277c81d68754484b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a07174891bc9836f90b1118cf21fe5a400c71f05d42ca19e7efd8c707b2f40632cdc83b0150c0823525f98d498849516b532e21c6105445b30b3ea0411bf74d0
|
7
|
+
data.tar.gz: 4ecaee8b53358240ecb2d07a2b0665179bb6735f19ccb2d532c4ac5d2c4801a6ed946ccde69a0c13dccca5d7ce9900f6ced77a48345f398ca9cbe0c6ec6bb4ed
|
@@ -6,7 +6,7 @@ module ActiveRecord
|
|
6
6
|
# pass table_name to #new_column
|
7
7
|
def columns(table_name)
|
8
8
|
# Limit, precision, and scale are all handled by the superclass.
|
9
|
-
column_definitions(table_name).map do |column_name, type, default, notnull, oid, fmod, collation|
|
9
|
+
column_definitions(table_name).map do |column_name, type, default, notnull, oid, fmod, collation, comment|
|
10
10
|
oid = oid.to_i
|
11
11
|
fmod = fmod.to_i
|
12
12
|
type_metadata = fetch_type_metadata(column_name, type, oid, fmod)
|
@@ -14,12 +14,12 @@ module ActiveRecord
|
|
14
14
|
default_value = extract_value_from_default(default)
|
15
15
|
|
16
16
|
default_function = extract_default_function(default_value, default)
|
17
|
-
new_column(table_name, column_name, default_value, cast_type, type_metadata, !notnull, default_function, collation)
|
17
|
+
new_column(table_name, column_name, default_value, cast_type, type_metadata, !notnull, default_function, collation, comment)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
# override
|
22
|
-
def new_column(table_name, column_name, default, cast_type, sql_type_metadata = nil, null = true, default_function = nil, collation = nil)
|
22
|
+
def new_column(table_name, column_name, default, cast_type, sql_type_metadata = nil, null = true, default_function = nil, collation = nil, comment = nil)
|
23
23
|
# JDBC gets true/false in Rails 4, where other platforms get 't'/'f' strings.
|
24
24
|
if null.is_a?(String)
|
25
25
|
null = (null == "t")
|
@@ -34,6 +34,7 @@ module ActiveRecord
|
|
34
34
|
table_name,
|
35
35
|
default_function,
|
36
36
|
collation,
|
37
|
+
comment,
|
37
38
|
cast_type,
|
38
39
|
column_info)
|
39
40
|
end
|
@@ -8,7 +8,7 @@ module ActiveRecord # :nodoc:
|
|
8
8
|
# cast_type example classes:
|
9
9
|
# OID::Spatial
|
10
10
|
# OID::Integer
|
11
|
-
def initialize(name, default, sql_type_metadata = nil, null = true, table_name = nil, default_function = nil, collation = nil, cast_type = nil, opts = nil)
|
11
|
+
def initialize(name, default, sql_type_metadata = nil, null = true, table_name = nil, default_function = nil, collation = nil, comment = nil, cast_type = nil, opts = nil)
|
12
12
|
@cast_type = cast_type
|
13
13
|
@geographic = !!(sql_type_metadata.sql_type =~ /geography\(/i)
|
14
14
|
if opts
|
@@ -29,7 +29,7 @@ module ActiveRecord # :nodoc:
|
|
29
29
|
# @geometric_type = geo_type_from_sql_type(sql_type)
|
30
30
|
build_from_sql_type(sql_type_metadata.sql_type)
|
31
31
|
end
|
32
|
-
super(name, default, sql_type_metadata, null, table_name, default_function, collation)
|
32
|
+
super(name, default, sql_type_metadata, null, table_name, default_function, collation, comment: comment)
|
33
33
|
if spatial?
|
34
34
|
if @srid
|
35
35
|
@limit = { srid: @srid, type: to_type_name(geometric_type) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-postgis-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma, Tee Parham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|