To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / extra / sample_plugin / db / migrate / 001_create_meetings.rb @ 441:cbce1fd3b1b7
History | View | Annotate | Download (376 Bytes)
| 1 |
# Sample plugin migration
|
|---|---|
| 2 |
# Use rake db:migrate_plugins to migrate installed plugins
|
| 3 |
class CreateMeetings < ActiveRecord::Migration |
| 4 |
def self.up |
| 5 |
create_table :meetings do |t| |
| 6 |
t.column :project_id, :integer, :null => false |
| 7 |
t.column :description, :string |
| 8 |
t.column :scheduled_on, :datetime |
| 9 |
end
|
| 10 |
end
|
| 11 |
|
| 12 |
def self.down |
| 13 |
drop_table :meetings
|
| 14 |
end
|
| 15 |
end
|