Class: CreateContacts
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateContacts
- Defined in:
- lib/generators/tkh_mailing_list/create_or_update_migrations/templates/create_contacts.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
14 15 16 17 |
# File 'lib/generators/tkh_mailing_list/create_or_update_migrations/templates/create_contacts.rb', line 14 def self.down drop_table :contacts remove_index :contacts, :updated_at end |
.up ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/generators/tkh_mailing_list/create_or_update_migrations/templates/create_contacts.rb', line 3 def self.up create_table :contacts do |t| t.string :sender_name t.string :sender_email t.text :body t. end add_index :contacts, :updated_at end |