switchman 1.2.30 → 1.2.31

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9d43f90b72896c88d968454e98ab442ad18194b
4
- data.tar.gz: e600c3c7f45533d7b738b366c8d717c9fb08d71f
3
+ metadata.gz: 53cd4e7fcce2f4407fe0949804d90639a512c995
4
+ data.tar.gz: ce3c82b47b980fd7f6ec7cd6b5dfd11780b2c915
5
5
  SHA512:
6
- metadata.gz: cabd3142197a1660624817a21ed5ac4a5776f5cb73160c57d85dc481c7ec6dd2490b5aa2aa1a46186ae0cec9ec401a3768a5ec6ceb36cb063a2846b017bf00a8
7
- data.tar.gz: f85ac155c530ce54a18b044771ce6e2702129fdb4a340e2433f6b516598df8f99c13b5c99bbb628f1da8d948156c78bd0f44dad6189f04867a29f7519cd7fe95
6
+ metadata.gz: b5beda385f90fba2690e06f03c290721036fc6052f4606b660db51902ede7f6d6135c10309f50412abab80c6d91ce8a85943f2813c1add35812675a61d9246f6
7
+ data.tar.gz: 48f1fbb16e4ffa1a63bc07ed6d0faf83f4d3eba59d9a2361da775a351fd705b219bc9a638d89e96d030ca2f6b31a246ecd4b86630258612b1d460f47ec6222f4
@@ -36,13 +36,8 @@ module Switchman
36
36
  conn
37
37
  end
38
38
 
39
- def release_connection_with_idle_timeout(*args)
40
- if ::Rails.version < '4'
41
- raise ArgumentError, "wrong number of arguments (1 for 0)" unless args.empty?
42
- release_connection_without_idle_timeout
43
- else
44
- release_connection_without_idle_timeout(*args)
45
- end
39
+ def release_connection_with_idle_timeout(with_id = current_connection_id)
40
+ release_connection_without_idle_timeout(with_id)
46
41
 
47
42
  # TODO may need a synchronize (or to be included in a synchronize
48
43
  # inside release_connection_without_idle_timeout) when we make
@@ -207,7 +207,7 @@ module Switchman
207
207
 
208
208
  reset_column_information
209
209
  unless create_schema == false
210
- migrate = -> { ::ActiveRecord::Migrator.migrate(::Rails.root + "db/migrate/") }
210
+ migrate = -> { ::ActiveRecord::Migrator.migrate(::ActiveRecord::Migrator.migrations_paths) }
211
211
  if ::ActiveRecord::Base.connection.supports_ddl_transactions?
212
212
  ::ActiveRecord::Base.connection.transaction(requires_new: true, &migrate)
213
213
  else
@@ -1,3 +1,3 @@
1
1
  module Switchman
2
- VERSION = "1.2.30"
2
+ VERSION = "1.2.31"
3
3
  end
@@ -0,0 +1,5 @@
1
+ migrations = Rails.root.join("db/migrate")
2
+
3
+ unless ActiveRecord::Migrator.migrations_paths.any? { |p| File.expand_path(p).to_s == migrations.to_s }
4
+ ActiveRecord::Migrator.migrations_paths << migrations
5
+ end
@@ -9,59 +9,56 @@
9
9
  # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
10
  # you'll amass, the slower it'll run and the greater likelihood for issues).
11
11
  #
12
- # It's strongly recommended that you check this file into your version control system.
12
+ # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20140219183820) do
14
+ ActiveRecord::Schema.define(:version => 20140219183820) do
15
15
 
16
- # These are extensions that must be enabled in order to support this database
17
- enable_extension "plpgsql"
18
-
19
- create_table "appendages", force: true do |t|
20
- t.integer "user_id", limit: 8
16
+ create_table "appendages", :force => true do |t|
17
+ t.integer "user_id", :limit => 8
21
18
  t.integer "value"
22
- t.datetime "created_at"
23
- t.datetime "updated_at"
19
+ t.datetime "created_at", :null => false
20
+ t.datetime "updated_at", :null => false
24
21
  end
25
22
 
26
- create_table "digits", force: true do |t|
27
- t.integer "appendage_id", limit: 8
23
+ create_table "digits", :force => true do |t|
24
+ t.integer "appendage_id", :limit => 8
28
25
  t.integer "value"
29
- t.datetime "created_at"
30
- t.datetime "updated_at"
26
+ t.datetime "created_at", :null => false
27
+ t.datetime "updated_at", :null => false
31
28
  end
32
29
 
33
- create_table "features", force: true do |t|
34
- t.integer "owner_id", limit: 8
30
+ create_table "features", :force => true do |t|
31
+ t.integer "owner_id", :limit => 8
35
32
  t.string "owner_type"
36
33
  t.integer "value"
37
- t.datetime "created_at"
38
- t.datetime "updated_at"
34
+ t.datetime "created_at", :null => false
35
+ t.datetime "updated_at", :null => false
39
36
  end
40
37
 
41
- create_table "mirror_users", force: true do |t|
42
- t.integer "user_id", limit: 8
43
- t.datetime "created_at"
44
- t.datetime "updated_at"
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
45
42
  end
46
43
 
47
- create_table "roots", force: true do |t|
48
- t.integer "user_id", limit: 8
49
- t.datetime "created_at"
50
- t.datetime "updated_at"
44
+ create_table "roots", :force => true do |t|
45
+ t.integer "user_id", :limit => 8
46
+ t.datetime "created_at", :null => false
47
+ t.datetime "updated_at", :null => false
51
48
  end
52
49
 
53
- create_table "switchman_shards", force: true do |t|
50
+ create_table "switchman_shards", :force => true do |t|
54
51
  t.string "name"
55
52
  t.string "database_server_id"
56
- t.boolean "default", default: false, null: false
53
+ t.boolean "default", :default => false, :null => false
57
54
  end
58
55
 
59
- create_table "users", force: true do |t|
56
+ create_table "users", :force => true do |t|
60
57
  t.string "name"
61
- t.integer "mirror_user_id", limit: 8
62
- t.datetime "created_at"
63
- t.datetime "updated_at"
64
- t.integer "parent_id", limit: 8
58
+ t.integer "mirror_user_id", :limit => 8
59
+ t.datetime "created_at", :null => false
60
+ t.datetime "updated_at", :null => false
61
+ t.integer "parent_id", :limit => 8
65
62
  end
66
63
 
67
64
  end
Binary file
Binary file
Binary file
Binary file
@@ -148,3 +148,4 @@ Migrating to CreateRoots (20140219183820)
148
148
  SQL (0.2ms) UPDATE "switchman_shards" SET "name" = $1 WHERE "switchman_shards"."id" = 2 [["name", "switchman_development_shard_2"]] [shard 1 master]
149
149
   (0.4ms) COMMIT [shard 1 master]
150
150
   (0.4ms) select current_user [shard 1 master]
151
+ Connecting to database specified by database.yml