sq-dbsync 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -171,20 +171,6 @@ Documentation
171
171
  * `timestamp` The column to treat as a timestamp. Must be a member of the
172
172
  `:columns` option. (default: select `updated_at` or `created_at`, in that
173
173
  order)
174
- * `type_casts` a hash for specifying column-level type casting from postgres
175
- data types to mysql data types. Primarily intended for custom postgres type
176
- defintions that have no mysql equivalent. The hash key is the column name,
177
- and the value is the desired mysql column type. See the
178
- `Sq::Dbsync::Database::Postgres::CASTS` constant for the format of the hash.
179
- Example:
180
-
181
- ```ruby
182
- {
183
- :table_name => :some_table,
184
- :columns => [ :custom_postgres_type ],
185
- :type_casts => { :custom_postgres_type => "varchar(255)" }
186
- }
187
- ```
188
174
 
189
175
  ### Handling Deletes
190
176
 
@@ -40,9 +40,7 @@ module Sq::Dbsync::Database
40
40
  table_name = source? ? plan.source_table_name : plan.table_name
41
41
  result = schema(table_name).each do |col, metadata|
42
42
  metadata[:source_db_type] ||= metadata[:db_type]
43
- metadata[:db_type] = cast_psql_to_mysql(
44
- metadata[:db_type], type_casts[col.to_s]
45
- )
43
+ metadata[:db_type] = cast_psql_to_mysql(metadata[:db_type])
46
44
  end
47
45
 
48
46
  Hash[result]
@@ -50,8 +48,8 @@ module Sq::Dbsync::Database
50
48
 
51
49
  protected
52
50
 
53
- def cast_psql_to_mysql(db_type, cast=nil)
54
- CASTS.fetch(db_type, cast || db_type)
51
+ def cast_psql_to_mysql(db_type)
52
+ CASTS.fetch(db_type, db_type)
55
53
  end
56
54
 
57
55
  # 'with time zone' pg fields have to be selected as
@@ -1,5 +1,5 @@
1
1
  module Sq
2
2
  module Dbsync
3
- VERSION = '1.0.8'
3
+ VERSION = '1.0.9'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sq-dbsync
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-31 00:00:00.000000000 Z
13
+ date: 2013-06-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec