Class: CreateBrowsingHistories
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateBrowsingHistories
- Defined in:
- lib/generators/active_record/templates/migration.rb
Instance Method Summary collapse
-
#down ⇒ Object
Drop table.
-
#up ⇒ Object
Create table.
Instance Method Details
#down ⇒ Object
Drop table
13 14 |
# File 'lib/generators/active_record/templates/migration.rb', line 13 def down end |
#up ⇒ Object
Create table
3 4 5 6 7 8 9 10 |
# File 'lib/generators/active_record/templates/migration.rb', line 3 def up create_table :browsing_histories do |t| t.references :browser, polymorphic: true, index: true t.references :historizable, polymorphic: true, index: true t.text :object, null: false t. null: false end end |