Created
March 19, 2014 18:26
-
-
Save chriscooning/9648103 to your computer and use it in GitHub Desktop.
migration modify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateSurveys < ActiveRecord::Migration | |
def change | |
create_table :surveys do |t| | |
t.integer :author_id, null: false | |
t.text :customer_name, null: false | |
t.string :phone, null: true | |
t.text :address, null: true | |
t.string :zipcode, null: true | |
t.string :city, null: true | |
t.string :state, null: true, limit: 2 | |
t.text :summary, null: false | |
t.integer :last_interaction_rating, null: false | |
t.timestamps | |
end | |
add_index :surveys, :author_id | |
add_index :surveys, :zipcode | |
add_index :surveys, :state | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment