On Wednesday, March 4, 2020 at 3:04:29 PM UTC-8, Aussie CodingFan wrote:
>
> I'm already aware of the update method, where you can update the contents 
> of one table.
>
> Is it possible to update all tables with a certain column name?
>

Yes.  You would first find all tables with that column name, then run the 
update for each:

DB.tables.each do |table|
  next unless DB[table].columns.include?(:column_name)
  DB[table].update(...)
end 

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/049a0b3f-2350-4151-a714-260783c78e37%40googlegroups.com.

Reply via email to