Skip to content

Instantly share code, notes, and snippets.

@aussiegeek
Created August 3, 2008 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aussiegeek/3813 to your computer and use it in GitHub Desktop.
Save aussiegeek/3813 to your computer and use it in GitHub Desktop.
#!env ruby
class DummyTable
def initialize(tablename)
@@tablename=tablename
end
def self.method_missing(m, *args); end
def self.datetime(name,options={})
puts "execute \"UPDATE #{@@tablename} SET #{name}=CONVERT_TZ(#{name},'SYSTEM','+00:00');\""
end
end
def create_table(tablename,options,*block)
dummy_table=DummyTable.new(tablename)
yield DummyTable
end
def add_index(name,fields,options={}); end
class ActiveRecord;end
class ActiveRecord::Schema
def self.define(options={}, *block)
yield
end
end
require 'db/schema.rb'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment