Skip to content

Instantly share code, notes, and snippets.

@dmerrick
Created August 17, 2011 14:22
Show Gist options
  • Select an option

  • Save dmerrick/1151613 to your computer and use it in GitHub Desktop.

Select an option

Save dmerrick/1151613 to your computer and use it in GitHub Desktop.
# this is an example migration template for you to tweak
# it is assumed that this file will be located in script/migrations
require File.expand_path('../../../config/environment', __FILE__)
class ExampleMigration < Migrations::KatamaMigration
# you can use DateTime.now.to_i
@@db_version = 1234567890
def up
puts "in #{self.class}#up"
end
# this will be executed if run with the --rollback flag
def down
puts "in #{self.class}#down"
end
end
if $0 == __FILE__
ExampleMigration.new.run
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment