Class: CreateRequests
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateRequests
- Defined in:
- lib/generators/callback_request_bootstrap/templates/migrations/create_requests.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
13 14 15 |
# File 'lib/generators/callback_request_bootstrap/templates/migrations/create_requests.rb', line 13 def self.down drop_table :requests end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/generators/callback_request_bootstrap/templates/migrations/create_requests.rb', line 2 def self.up create_table :requests do |t| t.string :name t.string :phone t.string :email t.text :notes t. end add_index :requests, [:phone] end |