From: Ryan Davis Date: 2012-10-24T06:21:04+09:00 Subject: Re: Ruby migrations of plain SQL On Oct 23, 2012, at 13:26 , Ian V. wrote: > Thanks for your reply, can you expand on how one could use AR or Sequel > to achieve this? I'm pulling this out of my butt: > class RawSQL1 < ActiveRecord::Migration > def change > execute_sql File.read("bogus.sql") > end > end which I would probably refactor to: > RawSQL1 = raw_execute "bogus.sql" so that each file can be quickly generated from a simple rake task.