Class: RocketCmsCreateContactMessages

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/rocket_cms/templates/migration_contact_messages.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/generators/rocket_cms/templates/migration_contact_messages.rb', line 2

def change
  create_table :contact_messages do |t|
    t.string :name
    t.string :email
    t.string :phone
    t.text :content
    t.timestamps
  end

  add_index :contact_messages, :created_at
  add_index :contact_messages, :updated_at
end