Guest User

Untitled

a guest
May 28th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. diff --git a/lib/sequel_core/schema/sql.rb b/lib/sequel_core/schema/sql.rb
  2. index fff9d3f..a5c3170 100644
  3. --- a/lib/sequel_core/schema/sql.rb
  4. +++ b/lib/sequel_core/schema/sql.rb
  5. @@ -29,7 +29,7 @@ module Sequel
  6. when :rename_column
  7. "RENAME COLUMN #{quoted_name} TO #{quote_identifier(op[:new_name])}"
  8. when :set_column_type
  9. - "ALTER COLUMN #{quoted_name} TYPE #{op[:type]}"
  10. + "ALTER COLUMN #{quoted_name} TYPE #{type_literal(op)}"
  11. when :set_column_default
  12. "ALTER COLUMN #{quoted_name} SET DEFAULT #{literal(op[:default])}"
  13. when :set_column_null
  14.  
  15.  
  16. DB.alter_table(:ads){set_column_type :type, :elements=>['foo', 'bar', 'baz', 'something_else']}
Add Comment
Please, Sign In to add comment