transactionable 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +29 -0
  5. data/app/assets/javascripts/transactionable/add_bank_account.js +45 -0
  6. data/app/assets/javascripts/transactionable/add_credit_card.js +87 -0
  7. data/app/assets/javascripts/transactionable/application.js +12 -0
  8. data/app/assets/stylesheets/transactionable/application.css +13 -0
  9. data/app/controllers/transactionable/application_controller.rb +4 -0
  10. data/app/helpers/transactionable/application_helper.rb +4 -0
  11. data/app/models/transactionable/bank_account.rb +35 -0
  12. data/app/models/transactionable/credit.rb +28 -0
  13. data/app/models/transactionable/credit_card.rb +39 -0
  14. data/app/models/transactionable/debit.rb +28 -0
  15. data/app/models/transactionable/refund.rb +5 -0
  16. data/app/models/transactionable/remote_bank_account.rb +4 -0
  17. data/app/models/transactionable/remote_credit_card.rb +7 -0
  18. data/app/models/transactionable/remote_customer.rb +39 -0
  19. data/app/models/transactionable/remote_entity.rb +42 -0
  20. data/app/models/transactionable/remote_transaction.rb +4 -0
  21. data/app/models/transactionable/reversal.rb +5 -0
  22. data/app/models/transactionable/transaction.rb +25 -0
  23. data/app/views/layouts/transactionable/application.html.erb +14 -0
  24. data/config/routes.rb +2 -0
  25. data/db/migrate/20140108145608_create_transactionable_remote_entities.rb +14 -0
  26. data/db/migrate/20140108182203_create_transactionable_credit_cards.rb +17 -0
  27. data/db/migrate/20140108190511_create_transactionable_transactions.rb +18 -0
  28. data/db/migrate/20140108213120_create_transactionable_bank_accounts.rb +17 -0
  29. data/lib/tasks/transactionable_tasks.rake +4 -0
  30. data/lib/transactionable.rb +9 -0
  31. data/lib/transactionable/acts_as_transactionable.rb +17 -0
  32. data/lib/transactionable/balanced_customer.rb +23 -0
  33. data/lib/transactionable/bank_account_transactionable.rb +23 -0
  34. data/lib/transactionable/credit_card_transactionable.rb +23 -0
  35. data/lib/transactionable/engine.rb +12 -0
  36. data/lib/transactionable/exceptions.rb +6 -0
  37. data/lib/transactionable/version.rb +3 -0
  38. data/spec/dummy/README.rdoc +28 -0
  39. data/spec/dummy/Rakefile +6 -0
  40. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  41. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  42. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  43. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  44. data/spec/dummy/app/models/user.rb +4 -0
  45. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  46. data/spec/dummy/bin/bundle +3 -0
  47. data/spec/dummy/bin/rails +4 -0
  48. data/spec/dummy/bin/rake +4 -0
  49. data/spec/dummy/config.ru +4 -0
  50. data/spec/dummy/config/application.rb +28 -0
  51. data/spec/dummy/config/boot.rb +5 -0
  52. data/spec/dummy/config/database.yml +25 -0
  53. data/spec/dummy/config/environment.rb +5 -0
  54. data/spec/dummy/config/environments/development.rb +29 -0
  55. data/spec/dummy/config/environments/production.rb +80 -0
  56. data/spec/dummy/config/environments/test.rb +36 -0
  57. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  58. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  59. data/spec/dummy/config/initializers/inflections.rb +16 -0
  60. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  61. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  62. data/spec/dummy/config/initializers/session_store.rb +3 -0
  63. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  64. data/spec/dummy/config/locales/en.yml +23 -0
  65. data/spec/dummy/config/routes.rb +4 -0
  66. data/spec/dummy/db/development.sqlite3 +0 -0
  67. data/spec/dummy/db/migrate/20140108162102_create_users.rb +8 -0
  68. data/spec/dummy/db/schema.rb +76 -0
  69. data/spec/dummy/db/test.sqlite3 +0 -0
  70. data/spec/dummy/log/development.log +471 -0
  71. data/spec/dummy/log/test.log +2875 -0
  72. data/spec/dummy/public/404.html +58 -0
  73. data/spec/dummy/public/422.html +58 -0
  74. data/spec/dummy/public/500.html +57 -0
  75. data/spec/dummy/public/favicon.ico +0 -0
  76. data/spec/factories/transactionable_credit_cards.rb +15 -0
  77. data/spec/factories/transactionable_debits.rb +6 -0
  78. data/spec/factories/transactionable_refunds.rb +6 -0
  79. data/spec/factories/transactionable_remote_credit_cards.rb +6 -0
  80. data/spec/factories/transactionable_remote_customers.rb +6 -0
  81. data/spec/factories/transactionable_remote_transactions.rb +6 -0
  82. data/spec/integration/acts_as_bank_account_transactionable_spec.rb +24 -0
  83. data/spec/integration/acts_as_credit_card_transactionable_spec.rb +46 -0
  84. data/spec/integration/models/bank_account_spec.rb +0 -0
  85. data/spec/integration/models/credit_card_spec.rb +28 -0
  86. data/spec/integration/models/credit_spec.rb +0 -0
  87. data/spec/integration/models/debit_spec.rb +0 -0
  88. data/spec/lib/transactionable_spec.rb +6 -0
  89. data/spec/models/transactionable/bank_account_spec.rb +7 -0
  90. data/spec/models/transactionable/credit_card_spec.rb +7 -0
  91. data/spec/models/transactionable/credit_spec.rb +7 -0
  92. data/spec/models/transactionable/debit_spec.rb +7 -0
  93. data/spec/models/transactionable/refund_spec.rb +7 -0
  94. data/spec/models/transactionable/remote_bank_account_spec.rb +7 -0
  95. data/spec/models/transactionable/remote_credit_card_spec.rb +7 -0
  96. data/spec/models/transactionable/remote_customer_spec.rb +7 -0
  97. data/spec/models/transactionable/remote_transaction_spec.rb +7 -0
  98. data/spec/models/transactionable/reversal_spec.rb +7 -0
  99. data/spec/models/transactionable/transaction_spec.rb +7 -0
  100. data/spec/spec_helper.rb +40 -0
  101. metadata +319 -0
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Dummy::Application.initialize!
@@ -0,0 +1,29 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+ end
@@ -0,0 +1,80 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both thread web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20
+ # config.action_dispatch.rack_cache = true
21
+
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
23
+ config.serve_static_assets = false
24
+
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
31
+
32
+ # Generate digests for assets URLs.
33
+ config.assets.digest = true
34
+
35
+ # Version of your assets, change this if you want to expire all your assets.
36
+ config.assets.version = '1.0'
37
+
38
+ # Specifies the header that your server uses for sending files.
39
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
40
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
41
+
42
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43
+ # config.force_ssl = true
44
+
45
+ # Set to :debug to see everything in the log.
46
+ config.log_level = :info
47
+
48
+ # Prepend all log lines with the following tags.
49
+ # config.log_tags = [ :subdomain, :uuid ]
50
+
51
+ # Use a different logger for distributed setups.
52
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
53
+
54
+ # Use a different cache store in production.
55
+ # config.cache_store = :mem_cache_store
56
+
57
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
58
+ # config.action_controller.asset_host = "http://assets.example.com"
59
+
60
+ # Precompile additional assets.
61
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
62
+ # config.assets.precompile += %w( search.js )
63
+
64
+ # Ignore bad email addresses and do not raise email delivery errors.
65
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
66
+ # config.action_mailer.raise_delivery_errors = false
67
+
68
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
69
+ # the I18n.default_locale when a translation can not be found).
70
+ config.i18n.fallbacks = true
71
+
72
+ # Send deprecation notices to registered listeners.
73
+ config.active_support.deprecation = :notify
74
+
75
+ # Disable automatic flushing of the log to improve performance.
76
+ # config.autoflush_log = false
77
+
78
+ # Use default logging formatter so that PID and timestamp are not suppressed.
79
+ config.log_formatter = ::Logger::Formatter.new
80
+ end
@@ -0,0 +1,36 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_assets = true
17
+ config.static_cache_control = "public, max-age=3600"
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Print deprecation notices to the stderr.
35
+ config.active_support.deprecation = :stderr
36
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ Dummy::Application.config.secret_key_base = '817d1812a4b5acab1b1c2be1b55dd66524faab7384c2b7b7ab89d090abb5b6afcbfa56b07aba9143b8ce569c598d7fbecb81f4bd03637fcc0d818e714f2f55e4'
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,4 @@
1
+ Rails.application.routes.draw do
2
+
3
+ mount Transactionable::Engine => "/transactionable"
4
+ end
@@ -0,0 +1,8 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :name
5
+ t.timestamps
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,76 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140108213120) do
15
+
16
+ create_table "transactionable_bank_accounts", force: true do |t|
17
+ t.integer "bank_accountable_id"
18
+ t.string "bank_accountable_type"
19
+ t.string "account_number"
20
+ t.string "name"
21
+ t.string "bank_name"
22
+ t.string "description"
23
+ t.string "account_type"
24
+ t.boolean "can_debit"
25
+ t.boolean "verified"
26
+ t.datetime "created_at"
27
+ t.datetime "updated_at"
28
+ end
29
+
30
+ create_table "transactionable_credit_cards", force: true do |t|
31
+ t.integer "credit_cardable_id"
32
+ t.string "credit_cardable_type"
33
+ t.string "name"
34
+ t.string "description"
35
+ t.integer "last_four"
36
+ t.string "brand"
37
+ t.integer "expiration_month"
38
+ t.integer "expiration_year"
39
+ t.date "expiration_date"
40
+ t.datetime "created_at"
41
+ t.datetime "updated_at"
42
+ end
43
+
44
+ create_table "transactionable_remote_entities", force: true do |t|
45
+ t.string "uri"
46
+ t.string "service_name"
47
+ t.integer "local_entity_id"
48
+ t.string "local_entity_type"
49
+ t.time "synced_at"
50
+ t.string "type"
51
+ t.datetime "created_at"
52
+ t.datetime "updated_at"
53
+ end
54
+
55
+ create_table "transactionable_transactions", force: true do |t|
56
+ t.integer "transactionable_id"
57
+ t.string "transactionable_type"
58
+ t.integer "transaction_loggable_id"
59
+ t.string "transaction_loggable_type"
60
+ t.integer "credit_id"
61
+ t.integer "debit_id"
62
+ t.decimal "amount", precision: 8, scale: 2
63
+ t.string "status"
64
+ t.string "description"
65
+ t.string "type"
66
+ t.datetime "created_at"
67
+ t.datetime "updated_at"
68
+ end
69
+
70
+ create_table "users", force: true do |t|
71
+ t.string "name"
72
+ t.datetime "created_at"
73
+ t.datetime "updated_at"
74
+ end
75
+
76
+ end
@@ -0,0 +1,471 @@
1
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
+ Migrating to CreateTransactionableRemoteEntities (20140108145608)
5
+  (0.1ms) begin transaction
6
+  (0.4ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
7
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140108145608"]]
8
+  (1.2ms) commit transaction
9
+ Migrating to CreateUsers (20140108162102)
10
+  (0.1ms) begin transaction
11
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
12
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140108162102"]]
13
+  (1.0ms) commit transaction
14
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
15
+  (0.3ms) begin transaction
16
+ SQL (6.9ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 08 Jan 2014 17:33:42 UTC +00:00], ["name", "Jackson"], ["updated_at", Wed, 08 Jan 2014 17:33:42 UTC +00:00]]
17
+  (1.2ms) commit transaction
18
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
19
+ User Load (0.3ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
20
+ User Load (0.3ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
21
+ Transactionable::RemoteCustomer Load (2.7ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
22
+  (0.1ms) begin transaction
23
+ SQL (4.1ms) INSERT INTO "transactionable_remote_entities" ("created_at", "local_entity_id", "local_entity_type", "synced_at", "type", "updated_at", "uri") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 08 Jan 2014 17:40:16 UTC +00:00], ["local_entity_id", 1], ["local_entity_type", "User"], ["synced_at", 2014-01-08 12:40:18 -0500], ["type", "Transactionable::RemoteCustomer"], ["updated_at", Wed, 08 Jan 2014 17:40:16 UTC +00:00], ["uri", "/v1/customers/CU7j9asWQdNem5K3RDGbrANF"]]
24
+  (1.1ms) commit transaction
25
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
26
+ Transactionable::RemoteCustomer Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
27
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
28
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
29
+ Transactionable::RemoteCustomer Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
30
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
31
+  (0.1ms) begin transaction
32
+ SQL (0.8ms) UPDATE "transactionable_remote_entities" SET "synced_at" = ?, "updated_at" = ? WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."id" = 1 [["synced_at", 2014-01-08 12:41:35 -0500], ["updated_at", Wed, 08 Jan 2014 17:41:35 UTC +00:00]]
33
+  (2.5ms) commit transaction
34
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
35
+ Migrating to CreateTransactionableCreditCards (20140108182203)
36
+  (0.1ms) begin transaction
37
+  (0.7ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime) 
38
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140108182203"]]
39
+  (1.1ms) commit transaction
40
+ Migrating to CreateTransactionableTransactions (20140108190511)
41
+  (0.1ms) begin transaction
42
+  (0.4ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal, "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
43
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140108190511"]]
44
+  (5.7ms) commit transaction
45
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
46
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
47
+ Transactionable::RemoteCustomer Load (3.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
48
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
49
+ Transactionable::RemoteCustomer Load (2.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
50
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
51
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
52
+  (0.1ms) begin transaction
53
+ SQL (5.5ms) INSERT INTO "transactionable_credit_cards" ("created_at", "credit_cardable_id", "credit_cardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 08 Jan 2014 20:30:28 UTC +00:00], ["credit_cardable_id", 1], ["credit_cardable_type", "User"], ["updated_at", Wed, 08 Jan 2014 20:30:28 UTC +00:00]]
54
+  (1.1ms) commit transaction
55
+  (0.1ms) begin transaction
56
+ SQL (0.8ms) INSERT INTO "transactionable_remote_entities" ("created_at", "local_entity_id", "local_entity_type", "type", "updated_at", "uri") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Wed, 08 Jan 2014 20:30:28 UTC +00:00], ["local_entity_id", 1], ["local_entity_type", "Transactionable::CreditCard"], ["type", "Transactionable::RemoteCreditCard"], ["updated_at", Wed, 08 Jan 2014 20:30:28 UTC +00:00], ["uri", "/v1/marketplaces/TEST-MP5nUYKdbTqu3pQz95HCWAAT/cards/CC2DRDq83NEl2N4Zqm6pZYTM"]]
57
+  (1.0ms) commit transaction
58
+ Transactionable::CreditCard Load (0.2ms) SELECT "transactionable_credit_cards".* FROM "transactionable_credit_cards" WHERE "transactionable_credit_cards"."id" = ? LIMIT 1 [["id", 1]]
59
+ Transactionable::RemoteCreditCard Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCreditCard') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::CreditCard"]]
60
+  (0.1ms) begin transaction
61
+ SQL (1.6ms) UPDATE "transactionable_credit_cards" SET "description" = ?, "last_four" = ?, "brand" = ?, "expiration_month" = ?, "expiration_year" = ?, "expiration_date" = ?, "updated_at" = ? WHERE "transactionable_credit_cards"."id" = 1 [["description", "Visa (1111)"], ["last_four", 1111], ["brand", "Visa"], ["expiration_month", 8], ["expiration_year", 2015], ["expiration_date", Sat, 01 Aug 2015], ["updated_at", Wed, 08 Jan 2014 20:30:28 UTC +00:00]]
62
+  (1.1ms) commit transaction
63
+ Transactionable::RemoteCustomer Load (0.5ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
64
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
65
+  (0.1ms) begin transaction
66
+ SQL (0.8ms) UPDATE "transactionable_remote_entities" SET "synced_at" = ?, "updated_at" = ? WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."id" = 1 [["synced_at", 2014-01-08 15:30:30 -0500], ["updated_at", Wed, 08 Jan 2014 20:30:30 UTC +00:00]]
67
+  (2.5ms) commit transaction
68
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
69
+ Transactionable::RemoteCustomer Load (0.2ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
70
+ Transactionable::CreditCard Load (0.5ms) SELECT "transactionable_credit_cards".* FROM "transactionable_credit_cards" WHERE "transactionable_credit_cards"."credit_cardable_id" = ? AND "transactionable_credit_cards"."credit_cardable_type" = ? [["credit_cardable_id", 1], ["credit_cardable_type", "User"]]
71
+ Transactionable::RemoteCreditCard Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCreditCard') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::CreditCard"]]
72
+ Transactionable::Transaction Load (0.3ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" ORDER BY "transactionable_transactions"."id" ASC LIMIT 1
73
+ User Load (0.5ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
74
+ Transactionable::CreditCard Load (2.4ms) SELECT "transactionable_credit_cards".* FROM "transactionable_credit_cards" WHERE "transactionable_credit_cards"."credit_cardable_id" = ? AND "transactionable_credit_cards"."credit_cardable_type" = ? ORDER BY "transactionable_credit_cards"."id" ASC LIMIT 1 [["credit_cardable_id", 1], ["credit_cardable_type", "User"]]
75
+ Transactionable::RemoteCreditCard Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCreditCard') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::CreditCard"]]
76
+  (0.1ms) begin transaction
77
+ SQL (2.1ms) INSERT INTO "transactionable_transactions" ("amount", "created_at", "status", "type", "updated_at") VALUES (?, ?, ?, ?, ?) [["amount", #<BigDecimal:7fbc4ccb1af0,'0.465E2',18(45)>], ["created_at", Wed, 08 Jan 2014 20:39:36 UTC +00:00], ["status", "succeeded"], ["type", "Transactionable::Debit"], ["updated_at", Wed, 08 Jan 2014 20:39:36 UTC +00:00]]
78
+  (1.1ms) commit transaction
79
+  (0.1ms) begin transaction
80
+ SQL (0.6ms) INSERT INTO "transactionable_remote_entities" ("created_at", "local_entity_id", "local_entity_type", "type", "updated_at", "uri") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Wed, 08 Jan 2014 20:39:36 UTC +00:00], ["local_entity_id", 1], ["local_entity_type", "Transactionable::Transaction"], ["type", "Transactionable::RemoteTransaction"], ["updated_at", Wed, 08 Jan 2014 20:39:36 UTC +00:00], ["uri", "/v1/marketplaces/TEST-MP5nUYKdbTqu3pQz95HCWAAT/debits/WD7ELIJreTUA1xrDhmiC9LlC"]]
81
+  (1.0ms) commit transaction
82
+  (0.1ms) begin transaction
83
+ SQL (0.6ms) UPDATE "transactionable_transactions" SET "transactionable_id" = ?, "transactionable_type" = ?, "updated_at" = ? WHERE "transactionable_transactions"."type" IN ('Transactionable::Debit') AND "transactionable_transactions"."id" = 1 [["transactionable_id", 1], ["transactionable_type", "Transactionable::CreditCard"], ["updated_at", Wed, 08 Jan 2014 20:39:36 UTC +00:00]]
84
+  (1.2ms) commit transaction
85
+ Transactionable::Debit Load (0.6ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Debit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? [["transactionable_id", 1], ["transactionable_type", "Transactionable::CreditCard"]]
86
+ Transactionable::CreditCard Load (0.4ms) SELECT "transactionable_credit_cards".* FROM "transactionable_credit_cards" WHERE "transactionable_credit_cards"."credit_cardable_id" = ? AND "transactionable_credit_cards"."credit_cardable_type" = ? ORDER BY "transactionable_credit_cards"."id" ASC LIMIT 1 [["credit_cardable_id", 1], ["credit_cardable_type", "User"]]
87
+ Transactionable::CreditCard Load (0.3ms) SELECT "transactionable_credit_cards".* FROM "transactionable_credit_cards" WHERE "transactionable_credit_cards"."credit_cardable_id" = ? AND "transactionable_credit_cards"."credit_cardable_type" = ? ORDER BY "transactionable_credit_cards"."id" ASC LIMIT 1 [["credit_cardable_id", 1], ["credit_cardable_type", "User"]]
88
+ Transactionable::Transaction Load (0.5ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? [["transactionable_id", 1], ["transactionable_type", "Transactionable::CreditCard"]]
89
+ Transactionable::CreditCard Load (0.3ms) SELECT "transactionable_credit_cards".* FROM "transactionable_credit_cards" WHERE "transactionable_credit_cards"."credit_cardable_id" = ? AND "transactionable_credit_cards"."credit_cardable_type" = ? ORDER BY "transactionable_credit_cards"."id" ASC LIMIT 1 [["credit_cardable_id", 1], ["credit_cardable_type", "User"]]
90
+ Transactionable::Transaction Load (0.5ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? ORDER BY "transactionable_transactions"."id" DESC LIMIT 1 [["transactionable_id", 1], ["transactionable_type", "Transactionable::CreditCard"]]
91
+ Transactionable::CreditCard Load (0.3ms) SELECT "transactionable_credit_cards".* FROM "transactionable_credit_cards" WHERE "transactionable_credit_cards"."credit_cardable_id" = ? AND "transactionable_credit_cards"."credit_cardable_type" = ? ORDER BY "transactionable_credit_cards"."id" ASC LIMIT 1 [["credit_cardable_id", 1], ["credit_cardable_type", "User"]]
92
+ Transactionable::Transaction Load (0.3ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? ORDER BY "transactionable_transactions"."id" DESC LIMIT 1 [["transactionable_id", 1], ["transactionable_type", "Transactionable::CreditCard"]]
93
+  (3.3ms) SELECT SUM("transactionable_transactions"."amount") AS sum_id FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Refund') AND "transactionable_transactions"."debit_id" = ? [["debit_id", 1]]
94
+ Transactionable::RemoteTransaction Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteTransaction') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::Transaction"]]
95
+  (0.1ms) begin transaction
96
+ SQL (0.6ms) INSERT INTO "transactionable_transactions" ("amount", "created_at", "status", "type", "updated_at") VALUES (?, ?, ?, ?, ?) [["amount", #<BigDecimal:7fbc4b2c3d00,'0.3889E2',18(45)>], ["created_at", Wed, 08 Jan 2014 20:41:27 UTC +00:00], ["status", "succeeded"], ["type", "Transactionable::Refund"], ["updated_at", Wed, 08 Jan 2014 20:41:27 UTC +00:00]]
97
+  (3.5ms) commit transaction
98
+  (0.1ms) begin transaction
99
+ SQL (0.5ms) INSERT INTO "transactionable_remote_entities" ("created_at", "local_entity_id", "local_entity_type", "type", "updated_at", "uri") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Wed, 08 Jan 2014 20:41:27 UTC +00:00], ["local_entity_id", 2], ["local_entity_type", "Transactionable::Transaction"], ["type", "Transactionable::RemoteTransaction"], ["updated_at", Wed, 08 Jan 2014 20:41:27 UTC +00:00], ["uri", "/v1/marketplaces/TEST-MP5nUYKdbTqu3pQz95HCWAAT/refunds/RF1TGlKWAb5P8RNkv5lJU5BR"]]
100
+  (1.0ms) commit transaction
101
+  (0.1ms) begin transaction
102
+ SQL (0.5ms) UPDATE "transactionable_transactions" SET "debit_id" = ?, "updated_at" = ? WHERE "transactionable_transactions"."type" IN ('Transactionable::Refund') AND "transactionable_transactions"."id" = 2 [["debit_id", 1], ["updated_at", Wed, 08 Jan 2014 20:41:27 UTC +00:00]]
103
+  (0.7ms) commit transaction
104
+ Transactionable::CreditCard Load (0.2ms) SELECT "transactionable_credit_cards".* FROM "transactionable_credit_cards" WHERE "transactionable_credit_cards"."id" = ? ORDER BY "transactionable_credit_cards"."id" ASC LIMIT 1 [["id", 1]]
105
+  (0.1ms) begin transaction
106
+ SQL (0.7ms) UPDATE "transactionable_transactions" SET "transactionable_id" = ?, "transactionable_type" = ?, "updated_at" = ? WHERE "transactionable_transactions"."type" IN ('Transactionable::Refund') AND "transactionable_transactions"."id" = 2 [["transactionable_id", 1], ["transactionable_type", "Transactionable::CreditCard"], ["updated_at", Wed, 08 Jan 2014 20:41:27 UTC +00:00]]
107
+  (0.9ms) commit transaction
108
+ Transactionable::Transaction Load (0.2ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? [["transactionable_id", 1], ["transactionable_type", "Transactionable::CreditCard"]]
109
+ Transactionable::CreditCard Load (0.3ms) SELECT "transactionable_credit_cards".* FROM "transactionable_credit_cards" WHERE "transactionable_credit_cards"."credit_cardable_id" = ? AND "transactionable_credit_cards"."credit_cardable_type" = ? ORDER BY "transactionable_credit_cards"."id" ASC LIMIT 1 [["credit_cardable_id", 1], ["credit_cardable_type", "User"]]
110
+ Transactionable::Transaction Load (0.3ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? [["transactionable_id", 1], ["transactionable_type", "Transactionable::CreditCard"]]
111
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
112
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
113
+ Migrating to CreateTransactionableTransactions (20140108190511)
114
+  (0.1ms) begin transaction
115
+  (1.2ms) DROP TABLE "transactionable_transactions"
116
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20140108190511'
117
+  (1.4ms) commit transaction
118
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
119
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
120
+ Migrating to CreateTransactionableTransactions (20140108190511)
121
+  (0.1ms) begin transaction
122
+  (0.7ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
123
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140108190511"]]
124
+  (2.4ms) commit transaction
125
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
126
+ User Load (0.5ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
127
+ Transactionable::RemoteCustomer Load (2.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
128
+ Transactionable::CreditCard Load (0.3ms) SELECT "transactionable_credit_cards".* FROM "transactionable_credit_cards" WHERE "transactionable_credit_cards"."credit_cardable_id" = ? AND "transactionable_credit_cards"."credit_cardable_type" = ? [["credit_cardable_id", 1], ["credit_cardable_type", "User"]]
129
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
130
+ Migrating to CreateTransactionableBankAccounts (20140108213120)
131
+  (0.3ms) begin transaction
132
+  (0.6ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
133
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140108213120"]]
134
+  (0.9ms) commit transaction
135
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
136
+ User Load (2.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
137
+ User Load (0.3ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
138
+ Transactionable::BankAccount Load (3.1ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
139
+  (0.2ms) begin transaction
140
+ SQL (2.8ms) INSERT INTO "transactionable_bank_accounts" ("bank_accountable_id", "bank_accountable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["bank_accountable_id", 1], ["bank_accountable_type", "User"], ["created_at", Wed, 08 Jan 2014 21:59:57 UTC +00:00], ["updated_at", Wed, 08 Jan 2014 21:59:57 UTC +00:00]]
141
+  (1.5ms) commit transaction
142
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
143
+  (0.1ms) begin transaction
144
+ SQL (4.4ms) INSERT INTO "transactionable_bank_accounts" ("bank_accountable_id", "bank_accountable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["bank_accountable_id", 1], ["bank_accountable_type", "User"], ["created_at", Wed, 08 Jan 2014 22:02:27 UTC +00:00], ["updated_at", Wed, 08 Jan 2014 22:02:27 UTC +00:00]]
145
+  (1.1ms) commit transaction
146
+  (0.1ms) begin transaction
147
+ SQL (0.6ms) INSERT INTO "transactionable_remote_entities" ("created_at", "local_entity_id", "local_entity_type", "type", "updated_at", "uri") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Wed, 08 Jan 2014 22:02:27 UTC +00:00], ["local_entity_id", 2], ["local_entity_type", "Transactionable::BankAccount"], ["type", "Transactionable::RemoteBankAccount"], ["updated_at", Wed, 08 Jan 2014 22:02:27 UTC +00:00], ["uri", "/v1/bank_accounts/BA126jTgKYoXvPJDhHN8BZxY"]]
148
+  (1.4ms) commit transaction
149
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."id" = ? LIMIT 1 [["id", 2]]
150
+ Transactionable::RemoteBankAccount Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 2], ["local_entity_type", "Transactionable::BankAccount"]]
151
+  (0.2ms) begin transaction
152
+ SQL (0.7ms) UPDATE "transactionable_bank_accounts" SET "bank_name" = ?, "description" = ?, "name" = ?, "can_debit" = ?, "account_type" = ?, "updated_at" = ? WHERE "transactionable_bank_accounts"."id" = 2 [["bank_name", "JPMORGAN CHASE BANK"], ["description", "xxxxxx0002"], ["name", "Joplin"], ["can_debit", false], ["account_type", "checking"], ["updated_at", Wed, 08 Jan 2014 22:02:28 UTC +00:00]]
153
+  (2.5ms) commit transaction
154
+ Transactionable::RemoteCustomer Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
155
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
156
+  (0.2ms) begin transaction
157
+ SQL (0.8ms) UPDATE "transactionable_remote_entities" SET "synced_at" = ?, "updated_at" = ? WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."id" = 1 [["synced_at", 2014-01-08 17:02:30 -0500], ["updated_at", Wed, 08 Jan 2014 22:02:30 UTC +00:00]]
158
+  (1.1ms) commit transaction
159
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
160
+ Transactionable::RemoteCustomer Load (0.2ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
161
+ Transactionable::BankAccount Load (0.4ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
162
+ Transactionable::RemoteBankAccount Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::BankAccount"]]
163
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."id" = ? LIMIT 1 [["id", 1]]
164
+ Transactionable::RemoteBankAccount Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::BankAccount"]]
165
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
166
+ Transactionable::RemoteBankAccount Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::BankAccount"]]
167
+ Transactionable::RemoteBankAccount Load (0.5ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1
168
+ Transactionable::RemoteBankAccount Load (0.6ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1
169
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."id" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["id", 2]]
170
+ Transactionable::RemoteBankAccount Load (0.5ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1
171
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."id" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["id", 2]]
172
+ Transactionable::RemoteBankAccount Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 2], ["local_entity_type", "Transactionable::BankAccount"]]
173
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
174
+ Transactionable::BankAccount Load (0.4ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
175
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
176
+ Transactionable::RemoteBankAccount Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::BankAccount"]]
177
+ Transactionable::RemoteBankAccount Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1
178
+  (0.4ms) SELECT COUNT(*) FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount')
179
+  (0.2ms) SELECT COUNT(*) FROM "transactionable_bank_accounts"
180
+ Transactionable::BankAccount Load (0.4ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1
181
+ Transactionable::BankAccount Load (0.4ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" ORDER BY "transactionable_bank_accounts"."id" DESC LIMIT 1
182
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" ORDER BY "transactionable_bank_accounts"."id" DESC LIMIT 1
183
+ Transactionable::RemoteBankAccount Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 2], ["local_entity_type", "Transactionable::BankAccount"]]
184
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1
185
+ SQL (1.5ms) DELETE FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."id" = 1
186
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1
187
+ Transactionable::RemoteBankAccount Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 2], ["local_entity_type", "Transactionable::BankAccount"]]
188
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
189
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
190
+ Transactionable::RemoteBankAccount Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 2], ["local_entity_type", "Transactionable::BankAccount"]]
191
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
192
+ Transactionable::RemoteBankAccount Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 2], ["local_entity_type", "Transactionable::BankAccount"]]
193
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
194
+ Transactionable::RemoteBankAccount Load (2.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 2], ["local_entity_type", "Transactionable::BankAccount"]]
195
+  (0.1ms) begin transaction
196
+ SQL (1.5ms) INSERT INTO "transactionable_transactions" ("amount", "created_at", "status", "type", "updated_at") VALUES (?, ?, ?, ?, ?) [["amount", #<BigDecimal:7fcd627bd130,'0.10075E3',18(45)>], ["created_at", Wed, 08 Jan 2014 22:14:39 UTC +00:00], ["status", "paid"], ["type", "Transactionable::Credit"], ["updated_at", Wed, 08 Jan 2014 22:14:39 UTC +00:00]]
197
+  (1.2ms) commit transaction
198
+  (0.1ms) begin transaction
199
+ SQL (0.6ms) INSERT INTO "transactionable_remote_entities" ("created_at", "local_entity_id", "local_entity_type", "type", "updated_at", "uri") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Wed, 08 Jan 2014 22:14:39 UTC +00:00], ["local_entity_id", 1], ["local_entity_type", "Transactionable::Transaction"], ["type", "Transactionable::RemoteTransaction"], ["updated_at", Wed, 08 Jan 2014 22:14:39 UTC +00:00], ["uri", "/v1/credits/CR22Xr7IstWUnx5C1v6bmB9J"]]
200
+  (1.1ms) commit transaction
201
+  (0.1ms) begin transaction
202
+ SQL (0.5ms) UPDATE "transactionable_transactions" SET "transactionable_id" = ?, "transactionable_type" = ?, "updated_at" = ? WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."id" = 1 [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"], ["updated_at", Wed, 08 Jan 2014 22:14:39 UTC +00:00]]
203
+  (0.8ms) commit transaction
204
+ Transactionable::Credit Load (0.3ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"]]
205
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
206
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
207
+ Transactionable::Credit Load (0.3ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"]]
208
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
209
+ Transactionable::Credit Load (0.6ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? ORDER BY "transactionable_transactions"."id" ASC LIMIT 1 [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"]]
210
+  (0.4ms) SELECT SUM("transactionable_transactions"."amount") AS sum_id FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Reversal') AND "transactionable_transactions"."credit_id" = ? [["credit_id", 1]]
211
+ Transactionable::RemoteTransaction Load (0.5ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteTransaction') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::Transaction"]]
212
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
213
+ Transactionable::Credit Load (0.3ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? ORDER BY "transactionable_transactions"."id" ASC LIMIT 1 [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"]]
214
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
215
+ Transactionable::Credit Load (0.3ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? ORDER BY "transactionable_transactions"."id" ASC LIMIT 1 [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"]]
216
+  (0.2ms) SELECT SUM("transactionable_transactions"."amount") AS sum_id FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Reversal') AND "transactionable_transactions"."credit_id" = ? [["credit_id", 1]]
217
+ Transactionable::RemoteTransaction Load (0.2ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteTransaction') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::Transaction"]]
218
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
219
+ Transactionable::Credit Load (0.3ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"]]
220
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
221
+ Transactionable::Credit Load (0.3ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? ORDER BY "transactionable_transactions"."id" ASC LIMIT 1 [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"]]
222
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
223
+ Transactionable::Credit Load (0.3ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? ORDER BY "transactionable_transactions"."id" ASC LIMIT 1 [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"]]
224
+ Transactionable::RemoteTransaction Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteTransaction') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::Transaction"]]
225
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
226
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
227
+ Transactionable::RemoteBankAccount Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 2], ["local_entity_type", "Transactionable::BankAccount"]]
228
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
229
+ Transactionable::RemoteBankAccount Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 2], ["local_entity_type", "Transactionable::BankAccount"]]
230
+ Transactionable::BankAccount Load (0.3ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
231
+ Transactionable::RemoteBankAccount Load (0.3ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 2], ["local_entity_type", "Transactionable::BankAccount"]]
232
+  (0.1ms) begin transaction
233
+ SQL (0.7ms) INSERT INTO "transactionable_transactions" ("amount", "created_at", "status", "type", "updated_at") VALUES (?, ?, ?, ?, ?) [["amount", #<BigDecimal:7fcd6612e0e0,'0.2E3',9(45)>], ["created_at", Wed, 08 Jan 2014 22:22:33 UTC +00:00], ["status", "paid"], ["type", "Transactionable::Credit"], ["updated_at", Wed, 08 Jan 2014 22:22:33 UTC +00:00]]
234
+  (3.5ms) commit transaction
235
+  (0.1ms) begin transaction
236
+ SQL (0.4ms) INSERT INTO "transactionable_remote_entities" ("created_at", "local_entity_id", "local_entity_type", "type", "updated_at", "uri") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Wed, 08 Jan 2014 22:22:33 UTC +00:00], ["local_entity_id", 2], ["local_entity_type", "Transactionable::Transaction"], ["type", "Transactionable::RemoteTransaction"], ["updated_at", Wed, 08 Jan 2014 22:22:33 UTC +00:00], ["uri", "/v1/credits/CR2RelRYNWmtTnNBinPuwHg4"]]
237
+  (0.7ms) commit transaction
238
+  (0.1ms) begin transaction
239
+ SQL (0.5ms) UPDATE "transactionable_transactions" SET "transactionable_id" = ?, "transactionable_type" = ?, "updated_at" = ? WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."id" = 2 [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"], ["updated_at", Wed, 08 Jan 2014 22:22:33 UTC +00:00]]
240
+  (0.7ms) commit transaction
241
+ Transactionable::Credit Load (0.2ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"]]
242
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
243
+ Transactionable::Credit Load (0.5ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? ORDER BY "transactionable_transactions"."id" DESC LIMIT 1 [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"]]
244
+ Transactionable::Credit Load (0.4ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? ORDER BY "transactionable_transactions"."id" DESC LIMIT 1 [["transactionable_id", 2], ["transactionable_type", "Transactionable::BankAccount"]]
245
+ Transactionable::RemoteTransaction Load (0.2ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteTransaction') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 2], ["local_entity_type", "Transactionable::Transaction"]]
246
+  (0.4ms) begin transaction
247
+ Transactionable::RemoteCustomer Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
248
+  (0.2ms) rollback transaction
249
+  (0.2ms) begin transaction
250
+ Transactionable::RemoteBankAccount Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 2], ["local_entity_type", "Transactionable::BankAccount"]]
251
+ SQL (0.6ms) DELETE FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."id" = ? [["id", 5]]
252
+ SQL (1.6ms) DELETE FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."id" = ? [["id", 2]]
253
+  (3.6ms) commit transaction
254
+ Transactionable::CreditCard Load (0.4ms) SELECT "transactionable_credit_cards".* FROM "transactionable_credit_cards" WHERE "transactionable_credit_cards"."credit_cardable_id" = ? AND "transactionable_credit_cards"."credit_cardable_type" = ? [["credit_cardable_id", 1], ["credit_cardable_type", "User"]]
255
+  (0.1ms) begin transaction
256
+ Transactionable::RemoteCreditCard Load (0.7ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCreditCard') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::CreditCard"]]
257
+ SQL (0.6ms) DELETE FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCreditCard') AND "transactionable_remote_entities"."id" = ? [["id", 2]]
258
+ SQL (0.2ms) DELETE FROM "transactionable_credit_cards" WHERE "transactionable_credit_cards"."id" = ? [["id", 1]]
259
+  (2.6ms) commit transaction
260
+ Transactionable::Transaction Load (0.4ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions"
261
+  (0.1ms) begin transaction
262
+ Transactionable::RemoteTransaction Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteTransaction') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "Transactionable::Transaction"]]
263
+  (0.3ms) rollback transaction
264
+ SQL (5.5ms) DELETE FROM "transactionable_transactions"
265
+  (0.3ms) SELECT COUNT(*) FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit')
266
+  (0.3ms) SELECT COUNT(*) FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Debit')
267
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
268
+ Transactionable::BankAccount Load (5.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
269
+  (0.2ms) begin transaction
270
+ SQL (2.4ms) INSERT INTO "transactionable_bank_accounts" ("bank_accountable_id", "bank_accountable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["bank_accountable_id", 1], ["bank_accountable_type", "User"], ["created_at", Wed, 08 Jan 2014 22:29:29 UTC +00:00], ["updated_at", Wed, 08 Jan 2014 22:29:29 UTC +00:00]]
271
+  (1.1ms) commit transaction
272
+  (0.1ms) begin transaction
273
+ SQL (0.6ms) INSERT INTO "transactionable_remote_entities" ("created_at", "local_entity_id", "local_entity_type", "type", "updated_at", "uri") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Wed, 08 Jan 2014 22:29:29 UTC +00:00], ["local_entity_id", 3], ["local_entity_type", "Transactionable::BankAccount"], ["type", "Transactionable::RemoteBankAccount"], ["updated_at", Wed, 08 Jan 2014 22:29:29 UTC +00:00], ["uri", "/v1/bank_accounts/BA2khTFCHNWjczgNVKkR9ZzO"]]
274
+  (1.0ms) commit transaction
275
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."id" = ? LIMIT 1 [["id", 3]]
276
+ Transactionable::RemoteBankAccount Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 3], ["local_entity_type", "Transactionable::BankAccount"]]
277
+  (0.1ms) begin transaction
278
+ SQL (0.7ms) UPDATE "transactionable_bank_accounts" SET "bank_name" = ?, "description" = ?, "name" = ?, "can_debit" = ?, "account_type" = ?, "updated_at" = ? WHERE "transactionable_bank_accounts"."id" = 3 [["bank_name", "JPMORGAN CHASE BANK"], ["description", "xxxxxx0002"], ["name", "User 1"], ["can_debit", false], ["account_type", "checking"], ["updated_at", Wed, 08 Jan 2014 22:29:30 UTC +00:00]]
279
+  (1.1ms) commit transaction
280
+ Transactionable::RemoteCustomer Load (0.5ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
281
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
282
+  (0.1ms) begin transaction
283
+ SQL (0.7ms) UPDATE "transactionable_remote_entities" SET "synced_at" = ?, "updated_at" = ? WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."id" = 1 [["synced_at", 2014-01-08 17:29:32 -0500], ["updated_at", Wed, 08 Jan 2014 22:29:32 UTC +00:00]]
284
+  (2.2ms) commit transaction
285
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
286
+ Transactionable::RemoteCustomer Load (0.2ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteCustomer') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 1], ["local_entity_type", "User"]]
287
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."bank_accountable_id" = ? AND "transactionable_bank_accounts"."bank_accountable_type" = ? [["bank_accountable_id", 1], ["bank_accountable_type", "User"]]
288
+ Transactionable::RemoteBankAccount Load (0.4ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteBankAccount') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 3], ["local_entity_type", "Transactionable::BankAccount"]]
289
+  (0.1ms) begin transaction
290
+ SQL (0.7ms) INSERT INTO "transactionable_transactions" ("amount", "created_at", "status", "type", "updated_at") VALUES (?, ?, ?, ?, ?) [["amount", #<BigDecimal:7ffbbb3fd220,'0.32023E3',18(45)>], ["created_at", Wed, 08 Jan 2014 22:30:19 UTC +00:00], ["status", "paid"], ["type", "Transactionable::Credit"], ["updated_at", Wed, 08 Jan 2014 22:30:19 UTC +00:00]]
291
+  (1.1ms) commit transaction
292
+  (0.1ms) begin transaction
293
+ SQL (0.6ms) INSERT INTO "transactionable_remote_entities" ("created_at", "local_entity_id", "local_entity_type", "type", "updated_at", "uri") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Wed, 08 Jan 2014 22:30:19 UTC +00:00], ["local_entity_id", 3], ["local_entity_type", "Transactionable::Transaction"], ["type", "Transactionable::RemoteTransaction"], ["updated_at", Wed, 08 Jan 2014 22:30:19 UTC +00:00], ["uri", "/v1/credits/CR3vdnALprY8aWcLwqe12fZo"]]
294
+  (1.0ms) commit transaction
295
+  (0.1ms) begin transaction
296
+ SQL (0.5ms) UPDATE "transactionable_transactions" SET "transactionable_id" = ?, "transactionable_type" = ?, "updated_at" = ? WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."id" = 3 [["transactionable_id", 3], ["transactionable_type", "Transactionable::BankAccount"], ["updated_at", Wed, 08 Jan 2014 22:30:19 UTC +00:00]]
297
+  (0.9ms) commit transaction
298
+ Transactionable::Credit Load (0.3ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Credit') AND "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? [["transactionable_id", 3], ["transactionable_type", "Transactionable::BankAccount"]]
299
+ Transactionable::Transaction Load (0.5ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? [["transactionable_id", 3], ["transactionable_type", "Transactionable::BankAccount"]]
300
+ Transactionable::RemoteTransaction Load (0.5ms) SELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteTransaction') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1 [["local_entity_id", 3], ["local_entity_type", "Transactionable::Transaction"]]
301
+  (0.5ms) SELECT SUM("transactionable_transactions"."amount") AS sum_id FROM "transactionable_transactions" WHERE "transactionable_transactions"."type" IN ('Transactionable::Reversal') AND "transactionable_transactions"."credit_id" = ? [["credit_id", 3]]
302
+  (0.1ms) begin transaction
303
+ SQL (0.6ms) INSERT INTO "transactionable_transactions" ("amount", "created_at", "status", "type", "updated_at") VALUES (?, ?, ?, ?, ?) [["amount", #<BigDecimal:7ffbbb021818,'0.32023E3',18(45)>], ["created_at", Wed, 08 Jan 2014 22:31:21 UTC +00:00], ["status", "succeeded"], ["type", "Transactionable::Reversal"], ["updated_at", Wed, 08 Jan 2014 22:31:21 UTC +00:00]]
304
+  (4.0ms) commit transaction
305
+  (0.1ms) begin transaction
306
+ SQL (0.8ms) INSERT INTO "transactionable_remote_entities" ("created_at", "local_entity_id", "local_entity_type", "type", "updated_at", "uri") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Wed, 08 Jan 2014 22:31:21 UTC +00:00], ["local_entity_id", 4], ["local_entity_type", "Transactionable::Transaction"], ["type", "Transactionable::RemoteTransaction"], ["updated_at", Wed, 08 Jan 2014 22:31:21 UTC +00:00], ["uri", "/v1/marketplaces/TEST-MP5nUYKdbTqu3pQz95HCWAAT/credits/CR3vdnALprY8aWcLwqe12fZo/reversals/RV4DYEuiso15sF3mqhsXPxD2"]]
307
+  (1.0ms) commit transaction
308
+  (0.1ms) begin transaction
309
+ SQL (0.5ms) UPDATE "transactionable_transactions" SET "credit_id" = ?, "updated_at" = ? WHERE "transactionable_transactions"."type" IN ('Transactionable::Reversal') AND "transactionable_transactions"."id" = 4 [["credit_id", 3], ["updated_at", Wed, 08 Jan 2014 22:31:21 UTC +00:00]]
310
+  (1.0ms) commit transaction
311
+ Transactionable::BankAccount Load (0.2ms) SELECT "transactionable_bank_accounts".* FROM "transactionable_bank_accounts" WHERE "transactionable_bank_accounts"."id" = ? ORDER BY "transactionable_bank_accounts"."id" ASC LIMIT 1 [["id", 3]]
312
+  (0.1ms) begin transaction
313
+ SQL (0.6ms) UPDATE "transactionable_transactions" SET "transactionable_id" = ?, "transactionable_type" = ?, "updated_at" = ? WHERE "transactionable_transactions"."type" IN ('Transactionable::Reversal') AND "transactionable_transactions"."id" = 4 [["transactionable_id", 3], ["transactionable_type", "Transactionable::BankAccount"], ["updated_at", Wed, 08 Jan 2014 22:31:21 UTC +00:00]]
314
+  (0.7ms) commit transaction
315
+ Transactionable::Transaction Load (0.2ms) SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? [["transactionable_id", 3], ["transactionable_type", "Transactionable::BankAccount"]]
316
+  (1.3ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
317
+  (1.2ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime)
318
+  (1.3ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
319
+  (1.2ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)
320
+  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
321
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
322
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
323
+  (0.1ms) SELECT version FROM "schema_migrations"
324
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108213120')
325
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108162102')
326
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108145608')
327
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108182203')
328
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108190511')
329
+  (1.3ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
330
+  (1.2ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime)
331
+  (1.2ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
332
+  (1.2ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)
333
+  (1.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
334
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
335
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
336
+  (0.1ms) SELECT version FROM "schema_migrations"
337
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108213120')
338
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108162102')
339
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108145608')
340
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108182203')
341
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108190511')
342
+  (3.0ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
343
+  (1.3ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime)
344
+  (1.3ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
345
+  (1.2ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)
346
+  (1.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
347
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
348
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
349
+  (0.1ms) SELECT version FROM "schema_migrations"
350
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108213120')
351
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108162102')
352
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108145608')
353
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108182203')
354
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108190511')
355
+  (2.8ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
356
+  (1.1ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime)
357
+  (0.9ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
358
+  (1.2ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)
359
+  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
360
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
361
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
362
+  (0.1ms) SELECT version FROM "schema_migrations"
363
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108213120')
364
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108162102')
365
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108145608')
366
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108182203')
367
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108190511')
368
+  (1.3ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
369
+  (1.2ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime)
370
+  (1.3ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
371
+  (1.2ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)
372
+  (1.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
373
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
374
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
375
+  (0.1ms) SELECT version FROM "schema_migrations"
376
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108213120')
377
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108162102')
378
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108145608')
379
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108182203')
380
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108190511')
381
+  (4.0ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
382
+  (1.2ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime)
383
+  (1.2ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
384
+  (1.2ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)
385
+  (1.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
386
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
387
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
388
+  (0.1ms) SELECT version FROM "schema_migrations"
389
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108213120')
390
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108162102')
391
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108145608')
392
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108182203')
393
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108190511')
394
+  (2.8ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
395
+  (1.2ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime)
396
+  (1.2ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
397
+  (1.2ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)
398
+  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
399
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
400
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
401
+  (0.1ms) SELECT version FROM "schema_migrations"
402
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108213120')
403
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108162102')
404
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108145608')
405
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108182203')
406
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108190511')
407
+  (3.9ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
408
+  (1.2ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime)
409
+  (1.2ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
410
+  (1.2ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)
411
+  (1.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
412
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
413
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
414
+  (0.1ms) SELECT version FROM "schema_migrations"
415
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108213120')
416
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108162102')
417
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108145608')
418
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108182203')
419
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108190511')
420
+  (2.8ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
421
+  (1.2ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime)
422
+  (1.2ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
423
+  (1.2ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)
424
+  (1.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
425
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
426
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
427
+  (0.1ms) SELECT version FROM "schema_migrations"
428
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108213120')
429
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108162102')
430
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108145608')
431
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108182203')
432
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108190511')
433
+  (2.6ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
434
+  (1.2ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime)
435
+  (1.2ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
436
+  (1.2ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)
437
+  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
438
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
439
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
440
+  (0.1ms) SELECT version FROM "schema_migrations"
441
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108213120')
442
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108162102')
443
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108145608')
444
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108182203')
445
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108190511')
446
+  (2.8ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
447
+  (1.2ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime)
448
+  (1.2ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
449
+  (1.2ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)
450
+  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
451
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
452
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
453
+  (0.1ms) SELECT version FROM "schema_migrations"
454
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108213120')
455
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108162102')
456
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108145608')
457
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108182203')
458
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108190511')
459
+  (1.3ms) CREATE TABLE "transactionable_bank_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bank_accountable_id" integer, "bank_accountable_type" varchar(255), "account_number" varchar(255), "name" varchar(255), "bank_name" varchar(255), "description" varchar(255), "account_type" varchar(255), "can_debit" boolean, "verified" boolean, "created_at" datetime, "updated_at" datetime) 
460
+  (1.2ms) CREATE TABLE "transactionable_credit_cards" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "credit_cardable_id" integer, "credit_cardable_type" varchar(255), "name" varchar(255), "description" varchar(255), "last_four" integer, "brand" varchar(255), "expiration_month" integer, "expiration_year" integer, "expiration_date" date, "created_at" datetime, "updated_at" datetime)
461
+  (1.2ms) CREATE TABLE "transactionable_remote_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uri" varchar(255), "service_name" varchar(255), "local_entity_id" integer, "local_entity_type" varchar(255), "synced_at" time, "type" varchar(255), "created_at" datetime, "updated_at" datetime) 
462
+  (1.2ms) CREATE TABLE "transactionable_transactions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "transactionable_id" integer, "transactionable_type" varchar(255), "transaction_loggable_id" integer, "transaction_loggable_type" varchar(255), "credit_id" integer, "debit_id" integer, "amount" decimal(8,2), "status" varchar(255), "description" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)
463
+  (1.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) 
464
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
465
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
466
+  (0.1ms) SELECT version FROM "schema_migrations"
467
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108213120')
468
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108162102')
469
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108145608')
470
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108182203')
471
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140108190511')