myreplicator 1.1.24 → 1.1.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -132,7 +132,7 @@ module Myreplicator
132
132
  options[:incremental_col] = @export_obj.incremental_column
133
133
  options[:incremental_col_type] = @export_obj.incremental_column_type
134
134
  #options[:incremental_val] = @export_obj.max_incremental_value
135
- options[:incremental_val] = @export_obj.destination_max_incremental_value
135
+ options[:incremental_val] = [@export_obj.destination_max_incremental_value.strftime('%Y-%m-%d %H:%M:%S'), @export_obj.max_incremental_value].min
136
136
  end
137
137
 
138
138
  #Kernel.p "===== incremental_export_into_outfile OPTIONS ====="
@@ -177,7 +177,7 @@ module Myreplicator
177
177
  end
178
178
 
179
179
  def self.compare_datatypes index, vertica_schema, mysql_schema
180
- type = VerticaTypes.convert mysql_schema[index]["data_type"], mysql_schema[index]["column_type"]
180
+ type = Myreplicator::VerticaTypes.convert mysql_schema[index]["data_type"], mysql_schema[index]["column_type"]
181
181
  if vertica_schema.rows[index][:data_type] != type
182
182
  if vertica_schema.rows[index][:data_type] != "timestamp"
183
183
  return true
@@ -3,7 +3,7 @@ module Myreplicator
3
3
 
4
4
  def self.convert type, col_type
5
5
  if mysql_vertica_conversion[type].blank?
6
- return col_type
6
+ return col_type.gsub("decimal","numeric")
7
7
  else
8
8
  return mysql_vertica_conversion[type]
9
9
  end
@@ -61,7 +61,8 @@ module Myreplicator
61
61
  #VerticaDb::Base.connection.execute sql
62
62
  Myreplicator::DB.exec_sql("vertica",sql)
63
63
  # rename
64
- sql = "ALTER TABLE #{options[:vertica_db]}.#{options[:vertica_schema]}.#{temp_table} RENAME TO #{options[:table]};"
64
+ sql = "ALTER TABLE #{options[:vertica_db]}.#{options[:vertica_schema]}.#{temp_table} RENAME TO \"#{options[:table]}\";"
65
+
65
66
  #VerticaDb::Base.connection.execute sql
66
67
  Myreplicator::DB.exec_sql("vertica",sql)
67
68
  end
@@ -365,7 +366,7 @@ module Myreplicator
365
366
  Kernel.p "===== DROP CMD ====="
366
367
  Kernel.p sql
367
368
  Myreplicator::DB.exec_sql("vertica",sql)
368
- sql = "ALTER TABLE #{options[:db]}.#{options[:destination_schema]}.#{options[:temp_table]} RENAME TO #{options[:table]};"
369
+ sql = "ALTER TABLE #{options[:db]}.#{options[:destination_schema]}.#{options[:temp_table]} RENAME TO \"#{options[:table]}\";"
369
370
  Kernel.p sql
370
371
  Myreplicator::DB.exec_sql("vertica",sql)
371
372
  else
@@ -1,3 +1,3 @@
1
1
  module Myreplicator
2
- VERSION = "1.1.24"
2
+ VERSION = "1.1.25"
3
3
  end
@@ -8842,3 +8842,6 @@ Connecting to database specified by database.yml
8842
8842
  Connecting to database specified by database.yml
8843
8843
  Connecting to database specified by database.yml
8844
8844
  Connecting to database specified by database.yml
8845
+ Connecting to database specified by database.yml
8846
+ Connecting to database specified by database.yml
8847
+ Connecting to database specified by database.yml
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myreplicator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.24
4
+ version: 1.1.25
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -333,6 +333,7 @@ files:
333
333
  - test/dummy/tmp/cache/assets/E2D/2C0/sprockets%2Ff0c2e561abf62fabc69462c2cfeef3d8
334
334
  - test/dummy/tmp/cache/assets/E76/790/sprockets%2Fdaf734b1fcabd6ca66b333ad0f0fdbf0
335
335
  - test/dummy/tmp/cache/assets/F08/560/sprockets%2F5ab2cf5fb087fdef95cfe9fe6fabf9df
336
+ - test/dummy/tmp/myreplicator/load_logs/public_.log
336
337
  - test/dummy/tmp/myreplicator/load_logs/public_app_csvs.log
337
338
  - test/fixtures/myreplicator/exports.yml
338
339
  - test/functional/myreplicator/exports_controller_test.rb
@@ -358,7 +359,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
358
359
  version: '0'
359
360
  segments:
360
361
  - 0
361
- hash: 2030272711464716021
362
+ hash: 4333337630484584926
362
363
  required_rubygems_version: !ruby/object:Gem::Requirement
363
364
  none: false
364
365
  requirements:
@@ -367,7 +368,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
367
368
  version: '0'
368
369
  segments:
369
370
  - 0
370
- hash: 2030272711464716021
371
+ hash: 4333337630484584926
371
372
  requirements: []
372
373
  rubyforge_project:
373
374
  rubygems_version: 1.8.24
@@ -469,6 +470,7 @@ test_files:
469
470
  - test/dummy/tmp/cache/assets/E2D/2C0/sprockets%2Ff0c2e561abf62fabc69462c2cfeef3d8
470
471
  - test/dummy/tmp/cache/assets/E76/790/sprockets%2Fdaf734b1fcabd6ca66b333ad0f0fdbf0
471
472
  - test/dummy/tmp/cache/assets/F08/560/sprockets%2F5ab2cf5fb087fdef95cfe9fe6fabf9df
473
+ - test/dummy/tmp/myreplicator/load_logs/public_.log
472
474
  - test/dummy/tmp/myreplicator/load_logs/public_app_csvs.log
473
475
  - test/fixtures/myreplicator/exports.yml
474
476
  - test/functional/myreplicator/exports_controller_test.rb