Sha256: 608768d1ea0a48906d8e01f624410490a8603999864da97e5b2c593746aaf551
Contents?: true
Size: 471 Bytes
Versions: 3
Compression:
Stored size: 471 Bytes
Contents
class MyFeedsMigration < ActiveRecord::Migration def change create_table :feeds do |t| #necessarily t.references :source, :polymorphic => true, :null => false t.string :source_identify, null: false t.string :event, null: false #not necessarily, but maybe you need #you can also customize your columns t.references :target, :polymorphic => true t.timestamps end add_index :feeds, :source_identify end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
my_feeds-0.1.1 | lib/rails/generators/templates/migration.rb |
my_feeds-0.1.0 | lib/rails/generators/templates/migration.rb |
my_feeds-0.0.1 | lib/rails/generators/templates/migration.rb |