mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Upgraded papertrail to 4.0.0.beta2
This commit is contained in:
parent
960cc0e195
commit
bd02845324
5 changed files with 61 additions and 24 deletions
17
db/migrate/20150122091556_create_version_associations.rb
Normal file
17
db/migrate/20150122091556_create_version_associations.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
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
|
|
@ -0,0 +1,11 @@
|
|||
class AddTransactionIdColumnToVersions < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :versions, :transaction_id, :integer
|
||||
add_index :versions, [:transaction_id]
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :versions, [:transaction_id]
|
||||
remove_column :versions, :transaction_id
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue