Sha256: f164483d22312e51649464ba369c5ee8956c4199d5a3643d7d154999e9ebdb16
Contents?: true
Size: 394 Bytes
Versions: 1
Compression:
Stored size: 394 Bytes
Contents
class LinkTicketsAndCommits < ActiveRecord::Migration def up create_table :commits_tickets, :id => false do |t| t.references :commit, :ticket end add_index :commits_tickets, [:commit_id, :ticket_id], :unique => true Commit.all.each do |commit| commit.send(:associate_tickets_with_self) end end def down drop_table :commits_tickets end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
houston-core-0.5.0.beta1 | db/migrate/20120626151320_link_tickets_and_commits.rb |