Skip to content

Instantly share code, notes, and snippets.

@slaskis
Created October 14, 2009 17:38
Show Gist options
  • Save slaskis/210242 to your computer and use it in GitHub Desktop.
Save slaskis/210242 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'dm-core'
require 'dm-migrations/migration_runner'
DataMapper::Logger.new("log/db.log", :debug)
DataMapper.setup(:default, ENV['DATABASE_URL'] || "sqlite3://#{Dir.pwd}/telenor.db")
DataMapper.logger.debug( "Starting Migration" )
migration 1, :change_integer_to_string do
up do
modify_table :posts do
change_column :from_id, String
end
end
down do
modify_table :posts do
change_column :from_id, Integer
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment