Sha256: 1537637ecc57d94b8a3001cb8b4e6653870e672aecf08de27dd635d46725490b
Contents?: true
Size: 471 Bytes
Versions: 1
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_identity, 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_identity end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
my_feeds-1.0.0 | lib/generators/templates/feeds_migration.rb |