activerecord-clean-db-structure 0.2.0 → 0.2.1

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: b826ee2d0030bf2cb6fbedbfb05847320fa903fd
4
- data.tar.gz: 3105bcadcc1e63393398a5f2f450f0f0d63d2718
3
+ metadata.gz: e9057b2cd9b40521bab9a324d89cc954c3133986
4
+ data.tar.gz: ce38ff48bea0d197a6bb73a611bdc32256c7a2cc
5
5
  SHA512:
6
- metadata.gz: 5105b9ec5ea3cb872dc2d9b04beb83fc3718acb79d1797d8aea9fbe5d511010a33656cd8a5b0c1e9d77d35b843ab535f29bc32afe4b97c4ae0fd2f069393ef00
7
- data.tar.gz: b259cee87ae4cbc9b75d8fcc6439fe30f37e05c9737e564baa03b1e25825cf64ab42b4eb78bb88b74621218dcb7383daef5bf8419c57a83b674b6f9b81df32ed
6
+ metadata.gz: 5d162f9da67461de48c48ac5aeeb4ee308965121a0450b26f478065de6a557ecf91670c5181796a4a072bdea35aff8426a7d25cf2389fa713e4d8c896bf90d38
7
+ data.tar.gz: b2f46a0a3bb71d278204a4d85aa08298716ac9a5dde77b0adca7d208c044cf1a402d6c919507bc11ae9dee3bc4c56f6d21bc4b41ab2934b2422f906390ff420a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1 2017-06-30
4
+
5
+ * Allow primary keys to be the last column of a table [Clemens Kofler](https://github.com/clemens)
6
+ - Special thanks to [Jon Mohrbacher](https://github.com/johnnymo87) who submitted a similar earlier change
7
+
8
+
3
9
  ## 0.2.0 2017-03-20
4
10
 
5
11
  * Reduce dependencies to only require ActiveRecord [Mario Uher](https://github.com/ream88)
data/Gemfile.lock CHANGED
@@ -1,29 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- activerecord-clean-db-structure (0.2.0)
4
+ activerecord-clean-db-structure (0.2.1)
5
5
  activerecord (>= 4.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (5.0.1)
11
- activesupport (= 5.0.1)
12
- activerecord (5.0.1)
13
- activemodel (= 5.0.1)
14
- activesupport (= 5.0.1)
15
- arel (~> 7.0)
16
- activesupport (5.0.1)
10
+ activemodel (5.1.0)
11
+ activesupport (= 5.1.0)
12
+ activerecord (5.1.0)
13
+ activemodel (= 5.1.0)
14
+ activesupport (= 5.1.0)
15
+ arel (~> 8.0)
16
+ activesupport (5.1.0)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (~> 0.7)
19
19
  minitest (~> 5.1)
20
20
  tzinfo (~> 1.1)
21
- arel (7.1.4)
22
- concurrent-ruby (1.0.4)
23
- i18n (0.8.0)
21
+ arel (8.0.0)
22
+ concurrent-ruby (1.0.5)
23
+ i18n (0.8.1)
24
24
  minitest (5.10.1)
25
- thread_safe (0.3.5)
26
- tzinfo (1.2.2)
25
+ thread_safe (0.3.6)
26
+ tzinfo (1.2.3)
27
27
  thread_safe (~> 0.1)
28
28
 
29
29
  PLATFORMS
@@ -30,9 +30,9 @@ module ActiveRecordCleanDbStructure
30
30
  # Reduce noise for id fields by making them SERIAL instead of integer+sequence stuff
31
31
  #
32
32
  # This is a bit optimistic, but works as long as you don't have an id field thats not a sequence/uuid
33
- dump.gsub!(/^ id integer NOT NULL,$/, ' id SERIAL PRIMARY KEY,')
34
- dump.gsub!(/^ id bigint NOT NULL,$/, ' id BIGSERIAL PRIMARY KEY,')
35
- dump.gsub!(/^ id uuid DEFAULT uuid_generate_v4\(\) NOT NULL,$/, ' id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,')
33
+ dump.gsub!(/^ id integer NOT NULL(,)?$/, ' id SERIAL PRIMARY KEY\1')
34
+ dump.gsub!(/^ id bigint NOT NULL(,)?$/, ' id BIGSERIAL PRIMARY KEY\1')
35
+ dump.gsub!(/^ id uuid DEFAULT uuid_generate_v4\(\) NOT NULL(,)?$/, ' id uuid DEFAULT uuid_generate_v4() PRIMARY KEY\1')
36
36
  dump.gsub!(/^CREATE SEQUENCE \w+_id_seq\s+START WITH 1\s+INCREMENT BY 1\s+NO MINVALUE\s+NO MAXVALUE\s+CACHE 1;$/, '')
37
37
  dump.gsub!(/^ALTER SEQUENCE \w+_id_seq OWNED BY .*;$/, '')
38
38
  dump.gsub!(/^ALTER TABLE ONLY \w+ ALTER COLUMN id SET DEFAULT nextval\('\w+_id_seq'::regclass\);$/, '')
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordCleanDbStructure
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-clean-db-structure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Fittl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-20 00:00:00.000000000 Z
11
+ date: 2017-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord