Upgraded papertrail to 4.0.0.beta2

This commit is contained in:
Priit Tark 2015-01-22 11:23:20 +02:00
parent 960cc0e195
commit bd02845324
5 changed files with 61 additions and 24 deletions

View file

@ -8,7 +8,7 @@ gem 'hashie_rails', '~> 0.0.1'
# model related
gem 'pg', '~> 0.18.0'
gem 'ransack', '~> 1.5.1' # for searching
gem 'paper_trail', '~> 3.0.6' # archiving
gem 'paper_trail', '~> 4.0.0.beta2' # archiving
gem 'rails-settings-cached', '~> 0.4.1' # for settings
gem 'delayed_job_active_record', '~> 4.0.3' # delayed job
@ -76,7 +76,7 @@ group :development, :test do
gem 'phantomjs-binaries', '~> 1.9.2.4'
gem 'poltergeist', '~> 1.5.1' # We are using PhantomJS instead
gem 'phantomjs', '~> 1.9.7.1'
gem 'fabrication', '~> 2.11.3' # Replacement for fixtures
gem 'fabrication', '~> 2.12.2' # Replacement for fixtures
gem 'shoulda-matchers', '~> 2.6.1', require: false # Additional matchers for RSpec
gem 'launchy', '~> 2.4.3' # for opening browser automatically

View file

@ -79,7 +79,7 @@ GEM
slim (>= 1.3.6, < 3.0)
terminal-table (~> 1.4)
builder (3.2.2)
bullet (4.14.0)
bullet (4.14.2)
activesupport (>= 3.0.0)
uniform_notifier (>= 1.6.0)
bundler-audit (0.3.1)
@ -134,7 +134,7 @@ GEM
equalizer (0.0.9)
erubis (2.7.0)
execjs (2.2.2)
fabrication (2.11.3)
fabrication (2.12.2)
faker (1.3.0)
i18n (~> 0.5)
fastercsv (1.5.5)
@ -198,14 +198,14 @@ GEM
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.2)
kaminari (0.16.1)
kaminari (0.16.2)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.9.2)
kgio (2.9.3)
launchy (2.4.3)
addressable (~> 2.3)
libv8 (3.16.14.7)
libxml-ruby (2.7.0)
libxml-ruby (2.8.0)
listen (2.8.5)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
@ -230,12 +230,11 @@ GEM
nprogress-rails (0.1.6.5)
open4 (1.3.4)
orm_adapter (0.5.0)
paper_trail (3.0.6)
activerecord (>= 3.0, < 5.0)
activesupport (>= 3.0, < 5.0)
parser (2.2.0.1)
paper_trail (4.0.0.beta2)
activerecord (>= 3.0, < 6.0)
activesupport (>= 3.0, < 6.0)
parser (2.2.0.2)
ast (>= 1.1, < 3.0)
slop (~> 3.4, >= 3.4.5)
pg (0.18.1)
phantomjs (1.9.7.1)
phantomjs-binaries (1.9.2.4)
@ -257,7 +256,7 @@ GEM
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-test (0.6.2)
rack-test (0.6.3)
rack (>= 1.0)
railroady (1.3.0)
rails (4.2.0)
@ -299,7 +298,6 @@ GEM
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rdoc (4.2.0)
json (~> 1.4)
reek (1.3.8)
rainbow (>= 1.99, < 3.0)
ruby2ruby (>= 2.0.8, < 3.0)
@ -347,7 +345,7 @@ GEM
reek (= 1.3.8)
ruby2ruby (>= 2.1.1, < 3.0)
virtus (~> 1.0)
sass (3.4.9)
sass (3.4.10)
sass-rails (5.0.1)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
@ -358,7 +356,7 @@ GEM
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
selectize-rails (0.11.2)
sexp_processor (4.4.4)
sexp_processor (4.4.5)
shoulda-matchers (2.6.2)
activesupport (>= 3.0.0)
simplecov (0.9.1)
@ -379,7 +377,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.2.2)
sprockets-rails (2.2.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
@ -445,7 +443,7 @@ DEPENDENCIES
devise (~> 3.4.1)
epp (~> 1.4.0)
epp-xml (~> 0.10.4)
fabrication (~> 2.11.3)
fabrication (~> 2.12.2)
faker (~> 1.3.0)
grape (~> 0.10.1)
guard (~> 2.6.1)
@ -464,7 +462,7 @@ DEPENDENCIES
newrelic_rpm (~> 3.9.9.275)
nokogiri (~> 1.6.2.1)
nprogress-rails (~> 0.1.6.5)
paper_trail (~> 3.0.6)
paper_trail (~> 4.0.0.beta2)
pg (~> 0.18.0)
phantomjs (~> 1.9.7.1)
phantomjs-binaries (~> 1.9.2.4)

View 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

View file

@ -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

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150120140346) do
ActiveRecord::Schema.define(version: 20150122091557) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -328,6 +328,15 @@ ActiveRecord::Schema.define(version: 20150120140346) do
t.string "roles", array: true
end
create_table "version_associations", force: :cascade do |t|
t.integer "version_id"
t.string "foreign_key_name", null: false
t.integer "foreign_key_id"
end
add_index "version_associations", ["foreign_key_name", "foreign_key_id"], name: "index_version_associations_on_foreign_key", using: :btree
add_index "version_associations", ["version_id"], name: "index_version_associations_on_version_id", using: :btree
create_table "versions", force: :cascade do |t|
t.string "item_type", limit: 255, null: false
t.integer "item_id", null: false
@ -335,9 +344,11 @@ ActiveRecord::Schema.define(version: 20150120140346) do
t.string "whodunnit", limit: 255
t.text "object"
t.datetime "created_at"
t.integer "transaction_id"
end
add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id", using: :btree
add_index "versions", ["transaction_id"], name: "index_versions_on_transaction_id", using: :btree
create_table "zonefile_settings", force: :cascade do |t|
t.string "origin", limit: 255