Class: CreateMessages
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateMessages
- Defined in:
- lib/generators/private_mail/install/templates/create_messages.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
15 16 17 |
# File 'lib/generators/private_mail/install/templates/create_messages.rb', line 15 def self.down drop_table :messages end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/generators/private_mail/install/templates/create_messages.rb', line 2 def self.up create_table :messages do |t| t.column :body, :text t.column :subject, :string, :default => "" t.column :headers, :text t.column :sender_id, :integer, :null => false t.column :conversation_id, :integer t.column :sent, :boolean, :default => false t.column :created_at, :datetime, :null => false end #i use foreign keys but its a custom method, so i'm leaving it up to you if you want them. end |