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 CHANGED
@@ -1 +1 @@
1
- 0.4.40
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.40"
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"]
@@ -204,8 +204,10 @@ module DataMiner
204
204
  _create_table
205
205
  end
206
206
  place_column ideal_primary_key_name
207
- DataMiner.log_debug "ADDING PRIMARY KEY #{ideal_primary_key_name}"
208
- connection.execute "ALTER TABLE `#{table_name}` ADD PRIMARY KEY (`#{ideal_primary_key_name}`)"
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
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 40
9
- version: 0.4.40
8
+ - 41
9
+ version: 0.4.41
10
10
  platform: ruby
11
11
  authors:
12
12
  - Seamus Abshere