Hi,
I'm trying to perform a migration that adds a column populated with the lower
case contents of an existing column.
The following runs, populates the column, but the downcase is discarded:
add_column :users, :uname, String
self[:users].update(:uname => :screen_name.downcase)
So, I'm just using:
add_column :users, :uname, String
self[:users].update(:uname => :screen_name)
and trying to somehow invoke:
update users set uname = lower(uname)
But I can't figure out how to do this.
The docs don't cover the use of a block for Sequel::Dataset.update, so I'm not
clear how to use it.
http://sequel.rubyforge.org/rdoc/classes/Sequel/Dataset.html#method-i-update
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sequel-talk/-/nIS8AgoT_z0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.