Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CreateMeasurements < ActiveRecord::Migration
- def self.up
- create_table :surveys do |t|
- t.references :object
- t.string :measurement_type
- t.integer :integer_data
- t.string :string_data
- t.datetime :datetime_data
- t.timestamps
- end
- add_index :measurements, :object_id
- add_index :measurements, :measurement_type
- end
- def self.down
- drop_table :measurements
- end
- end
Add Comment
Please, Sign In to add comment