data_miner 0.4.40 → 0.4.41
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/data_miner.gemspec +1 -1
- data/lib/data_miner/schema.rb +4 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.41
|
data/data_miner.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{data_miner}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.41"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Seamus Abshere", "Andy Rossmeissl"]
|
data/lib/data_miner/schema.rb
CHANGED
@@ -204,8 +204,10 @@ module DataMiner
|
|
204
204
|
_create_table
|
205
205
|
end
|
206
206
|
place_column ideal_primary_key_name
|
207
|
-
|
208
|
-
|
207
|
+
unless ideal.type.to_s == 'primary_key'
|
208
|
+
DataMiner.log_debug "SETTING #{ideal_primary_key_name} AS PRIMARY KEY"
|
209
|
+
connection.execute "ALTER TABLE `#{table_name}` ADD PRIMARY KEY (`#{ideal_primary_key_name}`)"
|
210
|
+
end
|
209
211
|
end
|
210
212
|
resource.reset_column_information
|
211
213
|
end
|