db_schema 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d1180d9c60f0843b544812dfea4fb494697cc69
4
- data.tar.gz: 4e4581809741785cc52199c7fa5c8ffb03307af3
3
+ metadata.gz: 6a09ea036b2a5cd5dbfe5de0a285d2f88d085cc1
4
+ data.tar.gz: 3aa56463f84cdeedd5ec878d49fab886d4f12acd
5
5
  SHA512:
6
- metadata.gz: ec90f1a30f2bb6bd662e47344fcc593290ff458bd937e005a1ee16e75e8d6f362115649560d7316f192beaf1dda67926a66105b6fa536edaaefbf00a04734d82
7
- data.tar.gz: 09cb9a9558dace6bbb1aaee8343e32430c885c5a14ee87c6f2900db172e0f728ff8c76de0a9c3d7ea2bfa58ec80139c0280cddab47febfe2e441dd8573ec8c7b
6
+ metadata.gz: dd2c597cb6e6c768dda725934bad84b70044bb5a44fcb7a4f4c4106d3bb37accc729fabec9683c53830598b17c04051b7e1d0081eadf597346ea19ce295013fb
7
+ data.tar.gz: 36738c9b037c4526683ee03ca796fe5afb10013a276117308948d30a0c5a485c2da921c33c03b43d0b9638d9b90a8bdfdee392e38e7163fca0c8072c128c8021
data/README.md CHANGED
@@ -53,7 +53,7 @@ But you would lose it even with manual migrations.
53
53
  Add this line to your application's Gemfile:
54
54
 
55
55
  ``` ruby
56
- gem 'db_schema', '~> 0.2.3'
56
+ gem 'db_schema', '~> 0.2.4'
57
57
  ```
58
58
 
59
59
  And then execute:
@@ -337,16 +337,10 @@ SELECT extname
337
337
  end
338
338
 
339
339
  def primary_key_for(table_name)
340
- if pkey = primary_keys[table_name]
340
+ if pkey = DbSchema.connection.primary_key(table_name)
341
341
  pkey.to_sym
342
342
  end
343
343
  end
344
-
345
- def primary_keys
346
- @primary_keys ||= DbSchema.connection.tables.reduce({}) do |primary_keys, table_name|
347
- primary_keys.merge(table_name => DbSchema.connection.primary_key(table_name))
348
- end
349
- end
350
344
  end
351
345
  end
352
346
 
@@ -1,3 +1,3 @@
1
1
  module DbSchema
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vsevolod Romashov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-01 00:00:00.000000000 Z
11
+ date: 2016-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel