activerecord-mysql-pkdump 0.0.1 → 0.0.2

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: c75428543e71c1a71ebe6bcef5b88a989574511d
4
- data.tar.gz: 605abc485b66474784a4d02111bf9d26a6996350
3
+ metadata.gz: 2f0d9a53befd0202111beb23c6a99b38ce59613a
4
+ data.tar.gz: c230aaf3f6d41e5e16db28bb718b322dbd5e59f3
5
5
  SHA512:
6
- metadata.gz: 9ab982d9c399efcc5ace7f0f8f80113d4e06d17c62e1f3e5eb0f5f0a420b59b9ab538714b85a3368611a46027106f8a9f05a851b7ad101c5592ec5eea8da1139
7
- data.tar.gz: 74810724654cedb6af383c4836549c0419e9fcad77b7c712691f5131a540c8ad3505fe86ba0e2d1ab2f13fdfb7dad06800f6ed869ec3b12a0812cb4cf3379cc6
6
+ metadata.gz: fa48a2e5b9aad96131faf78a1d75f229cec0d1b9c34ece4f88418cb99660606a6006791cb3450df0d93589db435efb0f881de6d2bfe13048fd348a8a6dcfabd7
7
+ data.tar.gz: 764c1b0b51da875d85edbc20bf79cfb949fb1138328c39042364e64c0b03c375a8386fa8f597b4a23f3873dd4dcbb9a5774ad40b4267b155b6c248295d8edc26
@@ -26,12 +26,10 @@ module ActiveRecord
26
26
  tbl.print %Q(, primary_key: "#{pk}")
27
27
  end
28
28
 
29
- pk_type = @types[:primary_key]
30
29
  int_type = @types[:integer][:name]
31
30
 
32
31
  unless pkcol.sql_type =~ /\A#{int_type}/
33
- pk_extra = pk_type.split(/\s+/).slice(1..-1).join(' ')
34
- sql_type = "#{pkcol.sql_type} #{pk_extra}"
32
+ sql_type = [pkcol.sql_type, 'PRIMARY KEY', pkcol.extra].join(' ').strip
35
33
  tbl.print ", id: #{sql_type.inspect}"
36
34
  end
37
35
  else
@@ -1,7 +1,7 @@
1
1
  module Activerecord
2
2
  module Mysql
3
3
  module Pkdump
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-mysql-pkdump
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara