myreplicator 1.1.39 → 1.1.40

Sign up to get free protection for your applications and to get access to all the features.
@@ -134,8 +134,14 @@ module Myreplicator
134
134
  if options[:export_type]=="incremental" && !options[:incremental_col].blank? && !options[:incremental_val].blank?
135
135
  if options[:incremental_col_type] == "datetime"
136
136
  sql += "WHERE #{options[:incremental_col]} >= '#{options[:incremental_val]}'"
137
+ if options[:incremental_val] == "0"
138
+ options[:incremental_val] = "1900-01-01 00:00:00"
139
+ end
137
140
  sql += "WHERE #{options[:incremental_col]} >= '#{(DateTime.parse(options[:incremental_val]) -1.day).to_s(:db)}'" #buffer 1 day
138
141
  elsif options[:incremental_col_type] == "int"
142
+ if options[:incremental_val].blank?
143
+ options[:incremental_val] = "0"
144
+ end
139
145
  sql += "WHERE #{options[:incremental_col]} >= #{options[:incremental_val].to_i - 10000}" #buffer 10000
140
146
  end
141
147
  end
@@ -1,3 +1,3 @@
1
1
  module Myreplicator
2
- VERSION = "1.1.39"
2
+ VERSION = "1.1.40"
3
3
  end
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.39
4
+ version: 1.1.40
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -298,7 +298,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
298
298
  version: '0'
299
299
  segments:
300
300
  - 0
301
- hash: 336617863757311280
301
+ hash: -1522272602632564110
302
302
  required_rubygems_version: !ruby/object:Gem::Requirement
303
303
  none: false
304
304
  requirements:
@@ -307,7 +307,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
307
307
  version: '0'
308
308
  segments:
309
309
  - 0
310
- hash: 336617863757311280
310
+ hash: -1522272602632564110
311
311
  requirements: []
312
312
  rubyforge_project:
313
313
  rubygems_version: 1.8.24