ar_firebird_adapter 1.0.5 → 1.0.6
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: 6a48598925e99638897dd6cceb351dc829efbf2d8b560be0307800b7b4433a53
|
4
|
+
data.tar.gz: 360c1d980ad13ca646ff3c07a4093bc4957bd9531fbb08b2b34b1319a66415e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a08e764b6a79934ffdb8baa070288edc80e4b96a54f810d56ed382022e0adf90f295292a1dd2f8f7e83ab2811285e4e98e9d82f13a90a26046450420ea5c79ae
|
7
|
+
data.tar.gz: dbd2b2c7874a746cd0dad58ff391de6c3a78da7a63fcfcfb70e89ea91f58288748efe523e157734ac01ad267b88d384d91f8d36a10b5b5931b76d0ce4c9506c1
|
@@ -112,9 +112,10 @@ module ActiveRecord
|
|
112
112
|
|
113
113
|
def change_column(table_name, column_name, type, options = {}) #:nodoc:
|
114
114
|
clear_cache!
|
115
|
-
type = type_to_sql(type)
|
115
|
+
type = (options[:limit] == 8 && type == :integer) ? "bigint" : type_to_sql(type, **options)
|
116
|
+
|
116
117
|
column = column_definitions(table_name.to_sym).find {|column| column["name"] == column_name.to_s }
|
117
|
-
if options[:limit]
|
118
|
+
if options[:limit] && type != "bigint"
|
118
119
|
type = "#{type.gsub(/\(.*\)/,'')}(#{options[:limit]})"
|
119
120
|
end
|
120
121
|
|
@@ -125,6 +126,12 @@ module ActiveRecord
|
|
125
126
|
execute "ALTER TABLE #{table_name} #{sql.join(', ')}" if sql.any?
|
126
127
|
end
|
127
128
|
|
129
|
+
|
130
|
+
def add_column(table_name, column_name, type, **options)
|
131
|
+
type = (options[:limit] == 8 && type == :integer) ? :bigint : type
|
132
|
+
super(table_name, column_name, type, **options)
|
133
|
+
end
|
134
|
+
|
128
135
|
private
|
129
136
|
|
130
137
|
def column_definitions(table_name)
|