Hey Jeremy,

I'm trying to do a column rename in production, and I want to have zero 
downtime, so I want to somehow write to the original column, and then when 
I run the migration I want to start writing to the renamed column. However, 
if I run the migration, the schema won't be updated. Is it somehow possible 
to refresh the schema inside the method? Or just `Sequel::Model.column` 
would also be great. I thought it would be good to do something like this:

class Company
  def similar_domains
    refresh_schema
    column = columns.grep(/similar_domains/)
    send(column)
  end

  def similar_domains=(value)
    refresh_schema
    column = columns.grep(/similar_domains/)
    send("#{column}=", value)
  end
end

I'm renaming `similar_domains_array` to `similar_domains` (the rest of the 
production code is currently referencing `smilar_domains`, which I'm 
currently delegating to `similar_domain_array`).

-- 
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