switchman 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +30 -0
  3. data/app/models/switchman/shard.rb +502 -0
  4. data/db/migrate/20130328212039_create_switchman_shards.rb +9 -0
  5. data/db/migrate/20130328224244_create_default_shard.rb +9 -0
  6. data/lib/switchman.rb +9 -0
  7. data/lib/switchman/active_record/abstract_adapter.rb +11 -0
  8. data/lib/switchman/active_record/association.rb +108 -0
  9. data/lib/switchman/active_record/attribute_methods.rb +104 -0
  10. data/lib/switchman/active_record/base.rb +95 -0
  11. data/lib/switchman/active_record/calculations.rb +63 -0
  12. data/lib/switchman/active_record/connection_handler.rb +147 -0
  13. data/lib/switchman/active_record/connection_pool.rb +117 -0
  14. data/lib/switchman/active_record/finder_methods.rb +25 -0
  15. data/lib/switchman/active_record/log_subscriber.rb +43 -0
  16. data/lib/switchman/active_record/postgresql_adapter.rb +13 -0
  17. data/lib/switchman/active_record/query_cache.rb +12 -0
  18. data/lib/switchman/active_record/query_methods.rb +184 -0
  19. data/lib/switchman/active_record/relation.rb +69 -0
  20. data/lib/switchman/cache_extensions.rb +12 -0
  21. data/lib/switchman/connection_pool_proxy.rb +62 -0
  22. data/lib/switchman/database_server.rb +197 -0
  23. data/lib/switchman/default_shard.rb +28 -0
  24. data/lib/switchman/engine.rb +91 -0
  25. data/lib/switchman/r_spec_helper.rb +124 -0
  26. data/lib/switchman/shackles.rb +34 -0
  27. data/lib/switchman/test_helper.rb +65 -0
  28. data/lib/switchman/version.rb +3 -0
  29. data/spec/dummy/Rakefile +7 -0
  30. data/spec/dummy/app/models/appendage.rb +24 -0
  31. data/spec/dummy/app/models/digit.rb +9 -0
  32. data/spec/dummy/app/models/feature.rb +5 -0
  33. data/spec/dummy/app/models/mirror_user.rb +5 -0
  34. data/spec/dummy/app/models/user.rb +23 -0
  35. data/spec/dummy/config.ru +4 -0
  36. data/spec/dummy/config/application.rb +59 -0
  37. data/spec/dummy/config/boot.rb +10 -0
  38. data/spec/dummy/config/database.yml +17 -0
  39. data/spec/dummy/config/database.yml.example +25 -0
  40. data/spec/dummy/config/environment.rb +5 -0
  41. data/spec/dummy/config/environments/development.rb +37 -0
  42. data/spec/dummy/config/environments/production.rb +67 -0
  43. data/spec/dummy/config/environments/test.rb +37 -0
  44. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  45. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  46. data/spec/dummy/config/initializers/session_store.rb +8 -0
  47. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  48. data/spec/dummy/config/routes.rb +8 -0
  49. data/spec/dummy/db/migrate/20130403132607_create_users.rb +10 -0
  50. data/spec/dummy/db/migrate/20130411202442_create_appendages.rb +10 -0
  51. data/spec/dummy/db/migrate/20130411202551_create_mirror_users.rb +9 -0
  52. data/spec/dummy/db/migrate/20131022202028_create_digits.rb +10 -0
  53. data/spec/dummy/db/migrate/20131206172923_create_features.rb +12 -0
  54. data/spec/dummy/db/schema.rb +57 -0
  55. data/spec/dummy/log/development.log +504 -0
  56. data/spec/dummy/log/test.log +29907 -0
  57. data/spec/dummy/script/rails +6 -0
  58. data/spec/dummy/tmp/cache/2E2/830/shard%2F2 +0 -0
  59. data/spec/dummy/tmp/cache/2E3/840/shard%2F3 +0 -0
  60. data/spec/dummy/tmp/cache/313/970/shard%2F30 +0 -0
  61. data/spec/dummy/tmp/cache/314/980/shard%2F31 +0 -0
  62. data/spec/dummy/tmp/cache/316/980/shard%2F15 +1 -0
  63. data/spec/dummy/tmp/cache/316/9D0/shard%2F60 +0 -0
  64. data/spec/dummy/tmp/cache/317/990/shard%2F16 +0 -0
  65. data/spec/dummy/tmp/cache/317/9C0/shard%2F43 +1 -0
  66. data/spec/dummy/tmp/cache/317/9E0/shard%2F61 +0 -0
  67. data/spec/dummy/tmp/cache/318/9A0/shard%2F17 +0 -0
  68. data/spec/dummy/tmp/cache/318/9D0/shard%2F44 +0 -0
  69. data/spec/dummy/tmp/cache/318/9F0/shard%2F62 +1 -0
  70. data/spec/dummy/tmp/cache/319/9E0/shard%2F45 +0 -0
  71. data/spec/dummy/tmp/cache/319/9F0/shard%2F54 +1 -0
  72. data/spec/dummy/tmp/cache/319/A10/shard%2F72 +1 -0
  73. data/spec/dummy/tmp/cache/319/A30/shard%2F90 +0 -0
  74. data/spec/dummy/tmp/cache/31B/9E0/shard%2F29 +1 -0
  75. data/spec/dummy/tmp/cache/321/AA0/shard%2F89 +0 -0
  76. data/spec/dummy/tmp/cache/322/AC0/shard%2F99 +1 -0
  77. data/spec/dummy/tmp/cache/344/D70/shard%2F103 +1 -0
  78. data/spec/dummy/tmp/cache/345/D80/shard%2F104 +0 -0
  79. data/spec/dummy/tmp/cache/345/DB0/shard%2F131 +1 -0
  80. data/spec/dummy/tmp/cache/345/DC0/shard%2F140 +0 -0
  81. data/spec/dummy/tmp/cache/346/D90/shard%2F105 +0 -0
  82. data/spec/dummy/tmp/cache/346/DB0/shard%2F123 +0 -0
  83. data/spec/dummy/tmp/cache/346/DD0/shard%2F222 +1 -0
  84. data/spec/dummy/tmp/cache/346/DE0/shard%2F150 +0 -0
  85. data/spec/dummy/tmp/cache/346/DF0/shard%2F240 +1 -0
  86. data/spec/dummy/tmp/cache/347/DA0/shard%2F106 +1 -0
  87. data/spec/dummy/tmp/cache/347/DC0/shard%2F124 +0 -0
  88. data/spec/dummy/tmp/cache/347/DC0/shard%2F205 +1 -0
  89. data/spec/dummy/tmp/cache/347/E10/shard%2F250 +1 -0
  90. data/spec/dummy/tmp/cache/348/DF0/shard%2F143 +1 -0
  91. data/spec/dummy/tmp/cache/348/DF0/shard%2F224 +1 -0
  92. data/spec/dummy/tmp/cache/348/E10/shard%2F161 +1 -0
  93. data/spec/dummy/tmp/cache/349/DD0/shard%2F117 +1 -0
  94. data/spec/dummy/tmp/cache/349/E40/shard%2F180 +1 -0
  95. data/spec/dummy/tmp/cache/34A/DF0/shard%2F127 +1 -0
  96. data/spec/dummy/tmp/cache/34A/DF0/shard%2F208 +1 -0
  97. data/spec/dummy/tmp/cache/34A/E10/shard%2F145 +1 -0
  98. data/spec/dummy/tmp/cache/34A/E60/shard%2F190 +1 -0
  99. data/spec/dummy/tmp/cache/34B/E30/shard%2F155 +1 -0
  100. data/spec/dummy/tmp/cache/34D/E30/shard%2F139 +0 -0
  101. data/spec/dummy/tmp/cache/34E/E50/shard%2F149 +0 -0
  102. data/spec/dummy/tmp/cache/353/EF0/shard%2F199 +1 -0
  103. data/spec/dummy/tmp/cache/3A4/E90/shard%2F10003 +1 -0
  104. data/spec/dummy/tmp/cache/3A5/ED0/shard%2F10031 +1 -0
  105. data/spec/dummy/tmp/cache/3A9/EF0/shard%2F10017 +1 -0
  106. data/spec/lib/active_record/association_spec.rb +305 -0
  107. data/spec/lib/active_record/attribute_methods_spec.rb +108 -0
  108. data/spec/lib/active_record/base_spec.rb +66 -0
  109. data/spec/lib/active_record/calculations_spec.rb +119 -0
  110. data/spec/lib/active_record/connection_handler_spec.rb +45 -0
  111. data/spec/lib/active_record/connection_pool_spec.rb +23 -0
  112. data/spec/lib/active_record/finder_methods_spec.rb +29 -0
  113. data/spec/lib/active_record/query_cache_spec.rb +20 -0
  114. data/spec/lib/active_record/query_methods_spec.rb +130 -0
  115. data/spec/lib/active_record/relation_spec.rb +38 -0
  116. data/spec/lib/cache_extensions_spec.rb +27 -0
  117. data/spec/lib/connection_pool_proxy_spec.rb +13 -0
  118. data/spec/lib/database_server_spec.rb +154 -0
  119. data/spec/lib/shackles_spec.rb +147 -0
  120. data/spec/models/shard_spec.rb +382 -0
  121. data/spec/spec_helper.rb +32 -0
  122. metadata +344 -0
@@ -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,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = '86515c01dbef2ec9e0c10e108466edcdbd73dddd49c57d4b07f60935dbdd7bcfb9aa5d5d5bd0f51f55f9e95801689ee598b1c900bd3a50dcefaea353f72c8afe'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # Dummy::Application.config.session_store :active_record_store
@@ -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]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,8 @@
1
+ Dummy::Application.routes.draw do
2
+ resources :users do
3
+ resources :appendages
4
+ end
5
+
6
+ match 'users/:id' => 'users#test1', :as => :user_test1
7
+ match 'users/:user_id/test2' => 'users#test2', :as => :user_test2
8
+ end
@@ -0,0 +1,10 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :name
5
+ t.integer :mirror_user_id, :limit => 8
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ class CreateAppendages < ActiveRecord::Migration
2
+ def change
3
+ create_table :appendages do |t|
4
+ t.integer :user_id, :limit => 8
5
+ t.integer :value
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,9 @@
1
+ class CreateMirrorUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :mirror_users do |t|
4
+ t.integer :user_id, :limit => 8
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+ class CreateDigits < ActiveRecord::Migration
2
+ def change
3
+ create_table :digits do |t|
4
+ t.integer :appendage_id, :limit => 8
5
+ t.integer :value
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,12 @@
1
+ class CreateFeatures < ActiveRecord::Migration
2
+ def change
3
+ create_table :features do |t|
4
+ t.integer :owner_id, :limit => 8
5
+ t.string :owner_type
6
+
7
+ t.integer :value
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,57 @@
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 to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20131206172923) do
15
+
16
+ create_table "appendages", :force => true do |t|
17
+ t.integer "user_id", :limit => 8
18
+ t.integer "value"
19
+ t.datetime "created_at", :null => false
20
+ t.datetime "updated_at", :null => false
21
+ end
22
+
23
+ create_table "digits", :force => true do |t|
24
+ t.integer "appendage_id", :limit => 8
25
+ t.integer "value"
26
+ t.datetime "created_at", :null => false
27
+ t.datetime "updated_at", :null => false
28
+ end
29
+
30
+ create_table "features", :force => true do |t|
31
+ t.integer "owner_id", :limit => 8
32
+ t.string "owner_type"
33
+ t.integer "value"
34
+ t.datetime "created_at", :null => false
35
+ t.datetime "updated_at", :null => false
36
+ end
37
+
38
+ create_table "mirror_users", :force => true do |t|
39
+ t.integer "user_id", :limit => 8
40
+ t.datetime "created_at", :null => false
41
+ t.datetime "updated_at", :null => false
42
+ end
43
+
44
+ create_table "switchman_shards", :force => true do |t|
45
+ t.string "name"
46
+ t.string "database_server_id"
47
+ t.boolean "default", :default => false, :null => false
48
+ end
49
+
50
+ create_table "users", :force => true do |t|
51
+ t.string "name"
52
+ t.integer "mirror_user_id", :limit => 8
53
+ t.datetime "created_at", :null => false
54
+ t.datetime "updated_at", :null => false
55
+ end
56
+
57
+ end
@@ -0,0 +1,504 @@
1
+ Connecting to database specified by database.yml
2
+ Connecting to database specified by database.yml
3
+  (0.8ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
4
+ PG::Error: ERROR: relation "switchman_shards" does not exist
5
+ LINE 5: WHERE a.attrelid = '"switchman_shards"'::regcla...
6
+ ^
7
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
8
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
9
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
10
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
11
+ WHERE a.attrelid = '"switchman_shards"'::regclass
12
+ AND a.attnum > 0 AND NOT a.attisdropped
13
+ ORDER BY a.attnum
14
+
15
+  (3.6ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) [shard default master]
16
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [shard default master]
17
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" [shard default master]
18
+ Migrating to CreateSwitchmanShards (20130328212039)
19
+  (0.1ms) BEGIN [shard default master]
20
+  (4.6ms) CREATE TABLE "switchman_shards" ("id" serial primary key, "name" character varying(255), "database_server_id" character varying(255), "default" boolean) [shard default master]
21
+  (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130328212039') [shard default master]
22
+  (0.4ms) COMMIT [shard default master]
23
+ Migrating to CreateDefaultShard (20130328224244)
24
+  (0.1ms) BEGIN [shard default master]
25
+ Switchman::Shard Exists (0.5ms) SELECT 1 AS one FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
26
+ SQL (5.8ms) INSERT INTO "switchman_shards" ("database_server_id", "default", "name") VALUES ($1, $2, $3) RETURNING "id" [["database_server_id", nil], ["default", true], ["name", nil]] [shard default master]
27
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
28
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130328224244') [shard 1 master]
29
+  (0.3ms) COMMIT [shard 1 master]
30
+ Migrating to CreateUsers (20130403132607)
31
+  (0.1ms) BEGIN [shard 1 master]
32
+  (1.9ms) CREATE TABLE "users" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [shard 1 master]
33
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130403132607') [shard 1 master]
34
+  (0.3ms) COMMIT [shard 1 master]
35
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  [shard 1 master]
36
+ Connecting to database specified by database.yml
37
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
38
+ Switchman::Shard Load (0.6ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
39
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
40
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
41
+  (7.7ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
42
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" [shard 1 master]
43
+ Migrating to CreateSwitchmanShards (20130328212039)
44
+ Migrating to CreateDefaultShard (20130328224244)
45
+ Migrating to CreateUsers (20130403132607)
46
+ Migrating to CreateAppendages (20130411202442)
47
+  (0.0ms) BEGIN [shard 1 master]
48
+  (2.8ms) CREATE TABLE "appendages" ("id" serial primary key, "user_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [shard 1 master]
49
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130411202442') [shard 1 master]
50
+  (0.5ms) COMMIT [shard 1 master]
51
+ Migrating to CreateMirrorUsers (20130411202551)
52
+  (0.1ms) BEGIN [shard 1 master]
53
+  (2.0ms) CREATE TABLE "mirror_users" ("id" serial primary key, "user_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [shard 1 master]
54
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130411202551') [shard 1 master]
55
+  (0.3ms) COMMIT [shard 1 master]
56
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  [shard 1 master]
57
+ Connecting to database specified by database.yml
58
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
59
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
60
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
61
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
62
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
63
+ PG::Error: ERROR: missing FROM-clause entry for table "appendages"
64
+ LINE 1: SELECT "users"."id" FROM "users" WHERE "appendages"."id" = ...
65
+ ^
66
+ : SELECT "users"."id" FROM "users" WHERE "appendages"."id" = 1
67
+ Connecting to database specified by database.yml
68
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
69
+ Switchman::Shard Load (1.9ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
70
+  (0.3ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
71
+ Switchman::Shard Load (1.0ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
72
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
73
+ Connecting to database specified by database.yml
74
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
75
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
76
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
77
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
78
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
79
+ PG::Error: ERROR: value "20000000000001" is out of range for type integer
80
+ : INSERT INTO "switchman_shards" ("database_server_id", "default", "id", "name") VALUES ($1, $2, $3, $4) RETURNING "id"
81
+ Connecting to database specified by database.yml
82
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
83
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
84
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
85
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
86
+  (0.3ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
87
+ Connecting to database specified by database.yml
88
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
89
+ Switchman::Shard Load (0.8ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
90
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
91
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
92
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
93
+ DEPRECATION WARNING: The method `local_user_id', matching the attribute `user_id' has dispatched through method_missing. This shouldn't happen, because `user_id' is a column of the table. If this error has happened through normal usage of Active Record (rather than through your own code or external libraries), please report it as a bug. (called from irb_binding at (irb):9)
94
+ Connecting to database specified by database.yml
95
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
96
+ Switchman::Shard Load (0.6ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
97
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
98
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
99
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
100
+ Connecting to database specified by database.yml
101
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
102
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
103
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
104
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
105
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
106
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" [shard 1 master]
107
+ Migrating to CreateUsers (20130403132607)
108
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  [shard 1 master]
109
+ Connecting to database specified by database.yml
110
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
111
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
112
+  (0.3ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
113
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
114
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
115
+ Switchman::Shard Load (0.2ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard 1 master]
116
+ PG::Error: ERROR: relation "switchman_shards" does not exist
117
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
118
+ ^
119
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
120
+  (124.6ms) DROP DATABASE IF EXISTS "switchman_development" [shard default master]
121
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
122
+ PG::Error: ERROR: relation "switchman_shards" does not exist
123
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
124
+ ^
125
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
126
+  (120.1ms) DROP DATABASE IF EXISTS "switchman_test" [shard default master]
127
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
128
+ PG::Error: ERROR: relation "switchman_shards" does not exist
129
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
130
+ ^
131
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
132
+  (269.5ms) CREATE DATABASE "switchman_development" ENCODING = 'utf8' [shard default master]
133
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
134
+ PG::Error: ERROR: relation "switchman_shards" does not exist
135
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
136
+ ^
137
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
138
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
139
+ PG::Error: ERROR: relation "switchman_shards" does not exist
140
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
141
+ ^
142
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
143
+  (232.8ms) CREATE DATABASE "switchman_test" ENCODING = 'utf8' [shard default master]
144
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
145
+ PG::Error: ERROR: relation "switchman_shards" does not exist
146
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
147
+ ^
148
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
149
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
150
+ PG::Error: ERROR: relation "switchman_shards" does not exist
151
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
152
+ ^
153
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
154
+  (4.5ms) CREATE TABLE "appendages" ("id" serial primary key, "user_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  [shard default master]
155
+  (2.1ms) CREATE TABLE "mirror_users" ("id" serial primary key, "user_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [shard default master]
156
+  (2.8ms) CREATE TABLE "switchman_shards" ("id" serial primary key, "name" character varying(255), "database_server_id" character varying(255), "default" boolean)  [shard default master]
157
+  (1.7ms) CREATE TABLE "users" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [shard default master]
158
+  (0.7ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)  [shard default master]
159
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [shard default master]
160
+  (0.2ms) SELECT version FROM "schema_migrations" [shard default master]
161
+  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20130411202551') [shard default master]
162
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20130403132607') [shard default master]
163
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20130328212039') [shard default master]
164
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20130328224244') [shard default master]
165
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" [shard default master]
166
+ Connecting to database specified by database.yml
167
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
168
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
169
+  (0.4ms) SELECT version FROM schema_migrations [shard default master]
170
+ Connecting to database specified by database.yml
171
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
172
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
173
+  (0.4ms) SELECT version FROM schema_migrations [shard default master]
174
+ Connecting to database specified by database.yml
175
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
176
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
177
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  [shard default master]
178
+  (8.4ms) DROP TABLE "users" [shard default master]
179
+  (0.6ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20130403132607' [shard default master]
180
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" [shard default master]
181
+ Connecting to database specified by database.yml
182
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
183
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
184
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  [shard default master]
185
+ Migrating to CreateSwitchmanShards (20130328212039)
186
+ Migrating to CreateDefaultShard (20130328224244)
187
+ Migrating to CreateUsers (20130403132607)
188
+  (0.0ms) BEGIN [shard default master]
189
+  (9.1ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying(255), "mirror_user_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  [shard default master]
190
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130403132607') [shard default master]
191
+  (0.5ms) COMMIT [shard default master]
192
+ Migrating to CreateAppendages (20130411202442)
193
+  (0.1ms) BEGIN [shard default master]
194
+  (1.1ms) CREATE TABLE "appendages" ("id" serial primary key, "user_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  [shard default master]
195
+ PG::Error: ERROR: relation "appendages" already exists
196
+ : CREATE TABLE "appendages" ("id" serial primary key, "user_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
197
+  (0.0ms) ROLLBACK [shard default master]
198
+ Connecting to database specified by database.yml
199
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
200
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
201
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  [shard default master]
202
+ Migrating to CreateSwitchmanShards (20130328212039)
203
+ Migrating to CreateDefaultShard (20130328224244)
204
+ Migrating to CreateUsers (20130403132607)
205
+ Migrating to CreateAppendages (20130411202442)
206
+  (0.0ms) BEGIN [shard default master]
207
+  (3.3ms) CREATE TABLE "appendages" ("id" serial primary key, "user_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  [shard default master]
208
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130411202442') [shard default master]
209
+  (0.4ms) COMMIT [shard default master]
210
+ Migrating to CreateMirrorUsers (20130411202551)
211
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" [shard default master]
212
+ Connecting to database specified by database.yml
213
+  (8.3ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
214
+ Switchman::Shard Load (1.6ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
215
+ Connecting to database specified by database.yml
216
+  (12.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
217
+ Switchman::Shard Load (1.7ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
218
+ Connecting to database specified by database.yml
219
+  (0.8ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
220
+ Switchman::Shard Load (0.7ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
221
+ PG::Error: ERROR: operator does not exist: character varying = integer
222
+ LINE 1: ...LECT "users".* FROM "users" WHERE "users"."name" IN (SELECT...
223
+ ^
224
+ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
225
+ : SELECT "users".* FROM "users" WHERE "users"."name" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = 1)
226
+ Connecting to database specified by database.yml
227
+  (7.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
228
+ Switchman::Shard Load (13.9ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
229
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
230
+ PG::Error: ERROR: relation "switchman_shards" does not exist
231
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
232
+ ^
233
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
234
+  (120.5ms) DROP DATABASE IF EXISTS "switchman_development" [shard default master]
235
+ Switchman::Shard Load (0.2ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
236
+ PG::Error: ERROR: relation "switchman_shards" does not exist
237
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
238
+ ^
239
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
240
+  (123.8ms) DROP DATABASE IF EXISTS "switchman_test" [shard default master]
241
+ Switchman::Shard Load (0.2ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
242
+ PG::Error: ERROR: relation "switchman_shards" does not exist
243
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
244
+ ^
245
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
246
+  (441.4ms) CREATE DATABASE "switchman_development" ENCODING = 'utf8' [shard default master]
247
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
248
+ PG::Error: ERROR: relation "switchman_shards" does not exist
249
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
250
+ ^
251
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
252
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
253
+ PG::Error: ERROR: relation "switchman_shards" does not exist
254
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
255
+ ^
256
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
257
+  (288.3ms) CREATE DATABASE "switchman_test" ENCODING = 'utf8' [shard default master]
258
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
259
+ PG::Error: ERROR: relation "switchman_shards" does not exist
260
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
261
+ ^
262
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
263
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
264
+ PG::Error: ERROR: relation "switchman_shards" does not exist
265
+ LINE 1: SELECT "switchman_shards".* FROM "switchman_shards" WHERE ...
266
+ ^
267
+ : SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1
268
+ Connecting to database specified by database.yml
269
+  (0.7ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
270
+ PG::Error: ERROR: relation "switchman_shards" does not exist
271
+ LINE 5: WHERE a.attrelid = '"switchman_shards"'::regcla...
272
+ ^
273
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
274
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
275
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
276
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
277
+ WHERE a.attrelid = '"switchman_shards"'::regclass
278
+ AND a.attnum > 0 AND NOT a.attisdropped
279
+ ORDER BY a.attnum
280
+
281
+  (2.6ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) [shard default master]
282
+  (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [shard default master]
283
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" [shard default master]
284
+ Migrating to CreateUsers (20130403132607)
285
+  (0.1ms) BEGIN [shard default master]
286
+  (2.7ms) CREATE TABLE "users" ("id" bigserial primary key, "name" character varying(255), "mirror_user_id" bigint, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [shard default master]
287
+  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130403132607') [shard default master]
288
+  (0.4ms) COMMIT [shard default master]
289
+ Migrating to CreateAppendages (20130411202442)
290
+  (0.1ms) BEGIN [shard default master]
291
+  (1.8ms) CREATE TABLE "appendages" ("id" bigserial primary key, "user_id" bigint, "value" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [shard default master]
292
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130411202442') [shard default master]
293
+  (0.3ms) COMMIT [shard default master]
294
+ Migrating to CreateMirrorUsers (20130411202551)
295
+  (0.1ms) BEGIN [shard default master]
296
+  (1.6ms) CREATE TABLE "mirror_users" ("id" bigserial primary key, "user_id" bigint, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [shard default master]
297
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130411202551') [shard default master]
298
+  (0.3ms) COMMIT [shard default master]
299
+ Migrating to CreateDigits (20131022202028)
300
+  (0.1ms) BEGIN [shard default master]
301
+  (1.7ms) CREATE TABLE "digits" ("id" bigserial primary key, "appendage_id" bigint, "value" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [shard default master]
302
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20131022202028') [shard default master]
303
+  (0.3ms) COMMIT [shard default master]
304
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  [shard default master]
305
+ Connecting to database specified by database.yml
306
+  (0.5ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
307
+ PG::Error: ERROR: relation "switchman_shards" does not exist
308
+ LINE 5: WHERE a.attrelid = '"switchman_shards"'::regcla...
309
+ ^
310
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
311
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
312
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
313
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
314
+ WHERE a.attrelid = '"switchman_shards"'::regclass
315
+ AND a.attnum > 0 AND NOT a.attisdropped
316
+ ORDER BY a.attnum
317
+
318
+ PG::Error: ERROR: relation "switchman_shards" does not exist
319
+ LINE 5: WHERE a.attrelid = '"switchman_shards"'::regcla...
320
+ ^
321
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
322
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
323
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
324
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
325
+ WHERE a.attrelid = '"switchman_shards"'::regclass
326
+ AND a.attnum > 0 AND NOT a.attisdropped
327
+ ORDER BY a.attnum
328
+
329
+ Connecting to database specified by database.yml
330
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
331
+ PG::Error: ERROR: relation "switchman_shards" does not exist
332
+ LINE 5: WHERE a.attrelid = '"switchman_shards"'::regcla...
333
+ ^
334
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
335
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
336
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
337
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
338
+ WHERE a.attrelid = '"switchman_shards"'::regclass
339
+ AND a.attnum > 0 AND NOT a.attisdropped
340
+ ORDER BY a.attnum
341
+
342
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" [shard default master]
343
+ Migrating to CreateUsers (20130403132607)
344
+ Migrating to CreateAppendages (20130411202442)
345
+ Migrating to CreateMirrorUsers (20130411202551)
346
+ Migrating to CreateDigits (20131022202028)
347
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  [shard default master]
348
+ Connecting to database specified by database.yml
349
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
350
+ PG::Error: ERROR: relation "switchman_shards" does not exist
351
+ LINE 5: WHERE a.attrelid = '"switchman_shards"'::regcla...
352
+ ^
353
+ : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
354
+ pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
355
+ FROM pg_attribute a LEFT JOIN pg_attrdef d
356
+ ON a.attrelid = d.adrelid AND a.attnum = d.adnum
357
+ WHERE a.attrelid = '"switchman_shards"'::regclass
358
+ AND a.attnum > 0 AND NOT a.attisdropped
359
+ ORDER BY a.attnum
360
+
361
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" [shard default master]
362
+ Migrating to CreateSwitchmanShards (20130328212039)
363
+  (0.1ms) BEGIN [shard default master]
364
+  (18.6ms) CREATE TABLE "switchman_shards" ("id" bigserial primary key, "name" character varying(255), "database_server_id" character varying(255), "default" boolean DEFAULT 'f' NOT NULL) [shard default master]
365
+  (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130328212039') [shard default master]
366
+  (0.5ms) COMMIT [shard default master]
367
+ Migrating to CreateDefaultShard (20130328224244)
368
+  (0.2ms) BEGIN [shard default master]
369
+ Switchman::Shard Exists (0.4ms) SELECT 1 AS one FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
370
+ SQL (6.3ms) INSERT INTO "switchman_shards" ("database_server_id", "default", "name") VALUES ($1, $2, $3) RETURNING "id" [["database_server_id", nil], ["default", true], ["name", nil]] [shard default master]
371
+ Switchman::Shard Load (0.2ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
372
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20130328224244') [shard 1 master]
373
+  (5.8ms) COMMIT [shard 1 master]
374
+ Migrating to CreateUsers (20130403132607)
375
+ Migrating to CreateAppendages (20130411202442)
376
+ Migrating to CreateMirrorUsers (20130411202551)
377
+ Migrating to CreateDigits (20131022202028)
378
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  [shard 1 master]
379
+ Connecting to database specified by database.yml
380
+  (0.5ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
381
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
382
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
383
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
384
+ Connecting to database specified by database.yml
385
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
386
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
387
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
388
+ Switchman::Shard Load (0.6ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
389
+ Connecting to database specified by database.yml
390
+  (0.5ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
391
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
392
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
393
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
394
+ Connecting to database specified by database.yml
395
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
396
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
397
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
398
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
399
+ Connecting to database specified by database.yml
400
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
401
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
402
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
403
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
404
+ Connecting to database specified by database.yml
405
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
406
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
407
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
408
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
409
+ Connecting to database specified by database.yml
410
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
411
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
412
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
413
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
414
+ Connecting to database specified by database.yml
415
+  (0.5ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
416
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
417
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
418
+ Switchman::Shard Load (0.6ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
419
+ Connecting to database specified by database.yml
420
+  (0.5ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
421
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
422
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
423
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
424
+ Connecting to database specified by database.yml
425
+  (0.5ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
426
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
427
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
428
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
429
+ Connecting to database specified by database.yml
430
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
431
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
432
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
433
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
434
+ Connecting to database specified by database.yml
435
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
436
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
437
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
438
+ Switchman::Shard Load (0.6ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
439
+ Connecting to database specified by database.yml
440
+  (0.5ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
441
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
442
+  (0.3ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
443
+ Switchman::Shard Load (0.8ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
444
+ Connecting to database specified by database.yml
445
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
446
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
447
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
448
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
449
+ Connecting to database specified by database.yml
450
+  (0.6ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
451
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
452
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
453
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
454
+ Connecting to database specified by database.yml
455
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
456
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
457
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
458
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
459
+ Connecting to database specified by database.yml
460
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
461
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
462
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
463
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
464
+ Connecting to database specified by database.yml
465
+  (0.5ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
466
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
467
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
468
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
469
+ Connecting to database specified by database.yml
470
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
471
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
472
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
473
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
474
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
475
+ Connecting to database specified by database.yml
476
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
477
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
478
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
479
+ Switchman::Shard Load (0.3ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
480
+  (0.5ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
481
+ Connecting to database specified by database.yml
482
+  (7.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
483
+ Switchman::Shard Load (24.6ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
484
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
485
+ Switchman::Shard Load (0.7ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
486
+  (7.1ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
487
+ Connecting to database specified by database.yml
488
+  (6.6ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
489
+ Switchman::Shard Load (24.2ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
490
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
491
+ Switchman::Shard Load (1.0ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
492
+  (7.2ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
493
+ Connecting to database specified by database.yml
494
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
495
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
496
+  (0.1ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
497
+ Switchman::Shard Load (0.4ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
498
+  (0.4ms) SELECT * FROM unnest(current_schemas(false)) [shard master]
499
+ Connecting to database specified by database.yml
500
+  (0.6ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
501
+ Switchman::Shard Load (7.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."default" = 't' LIMIT 1 [shard default master]
502
+  (0.2ms) SELECT * FROM unnest(current_schemas(false)) [shard default master]
503
+ Switchman::Shard Load (0.5ms) SELECT "switchman_shards".* FROM "switchman_shards" WHERE "switchman_shards"."database_server_id" = 'test' AND "switchman_shards"."name" IS NULL LIMIT 1 [shard 1 master]
504
+  (0.6ms) SELECT * FROM unnest(current_schemas(false)) [shard master]