Permalink
Browse files

Add an example of change_column and a note that it's kind of retarded.

  • Loading branch information...
1 parent ab608e8 commit d6458a55ea639bbc93e4b84fdc6f6ee2fe8503ec @xaviershay xaviershay committed Feb 26, 2011
Showing with 11 additions and 0 deletions.
  1. +11 −0 README.rdoc
View
@@ -15,6 +15,7 @@ DataMapper plugin for writing and specing migrations.
up do
create_table :people do
column :id, Integer, :serial => true
+ column :desc, String
end
end
@@ -23,6 +24,16 @@ DataMapper plugin for writing and specing migrations.
end
end
+ migration 2, :make_desc_text do
+ up do
+ modify_table :people do
+ # You currently have to use the underlying DB type here, rather than
+ # a DataMapper type
+ change_column :desc, 'text'
+ end
+ end
+ end
+
migrate_up!
For more, see the examples directory.

0 comments on commit d6458a5

Please sign in to comment.