Sha256: 843186002ddd2a74574516e80629f4ded541206c3407eb11eb50614588b58ddf

Contents?: true

Size: 634 Bytes

Versions: 14

Compression:

Stored size: 634 Bytes

Contents

class CreateVersionAssociations < ActiveRecord::Migration
  def self.up
    create_table :version_associations do |t|
      t.integer  :version_id
      t.string   :foreign_key_name, :null => false
      t.integer  :foreign_key_id
    end
    add_index :version_associations, [:version_id]
    add_index :version_associations, [:foreign_key_name, :foreign_key_id], :name => 'index_version_associations_on_foreign_key'
  end

  def self.down
    remove_index :version_associations, [:version_id]
    remove_index :version_associations, :name => 'index_version_associations_on_foreign_key'
    drop_table :version_associations
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
paper_trail-4.2.0 lib/generators/paper_trail/templates/create_version_associations.rb
rails_admin_cms-0.1.1 db/migrate/20150111082040_create_version_associations.rb
rails_admin_cms-0.0.9 db/migrate/20150111082040_create_version_associations.rb
rails_admin_cms-0.0.7 db/migrate/20150111082040_create_version_associations.rb
paper_trail-4.1.0 lib/generators/paper_trail/templates/create_version_associations.rb
paper_trail-4.0.2 lib/generators/paper_trail/templates/create_version_associations.rb
rails_admin_cms-0.0.6 db/migrate/20150111082040_create_version_associations.rb
rails_admin_cms-0.0.5 db/migrate/20150111082040_create_version_associations.rb
paper_trail-4.0.1 lib/generators/paper_trail/templates/create_version_associations.rb
paper_trail-4.0.0 lib/generators/paper_trail/templates/create_version_associations.rb
paper_trail-4.0.0.rc2 lib/generators/paper_trail/templates/create_version_associations.rb
paper_trail-4.0.0.rc1 lib/generators/paper_trail/templates/create_version_associations.rb
paper_trail-4.0.0.beta2 lib/generators/paper_trail/templates/create_version_associations.rb
paper_trail-4.0.0.beta1 lib/generators/paper_trail/templates/create_version_associations.rb