On Monday, February 23, 2015 at 4:49:33 PM UTC-8, Martin Feckie wrote:
>
> Hi Folks!
>
> When I do sequel -C from MS SQL to Postgres, the boolean columns (bit in 
> MSSQL) become strings in postgres. 
>
> Is there a way of specifying a particular type to map from / to?  I've 
> looked through the docs, but can't find anything obvious.
>

 Can you try this diff:

diff --git a/lib/sequel/extensions/schema_dumper.rb 
b/lib/sequel/extensions/schema_dumper.rb
index 99921ff..f11e3f5 100644
--- a/lib/sequel/extensions/schema_dumper.rb
+++ b/lib/sequel/extensions/schema_dumper.rb
@@ -31,7 +31,7 @@ module Sequel
         {:type=>Bignum}
       when /\A(?:real|float|double(?: precision)?|double\(\d+,\d+\)(?: 
unsigned)?)\z/o
         {:type=>Float}
-      when 'boolean'
+      when 'boolean', 'bit'
         {:type=>TrueClass}
       when /\A(?:(?:tiny|medium|long|n)?text|clob)\z/o
         {:type=>String, :text=>true}

There isn't support for choosing specific types when using -C.  bin/sequel 
-C is not designed to handle all possible use cases, if you want something 
more advanced, you'll have to write some custom code.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to