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 +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +13 -13
- data/lib/activerecord-clean-db-structure/clean_dump.rb +3 -3
- data/lib/activerecord-clean-db-structure/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9057b2cd9b40521bab9a324d89cc954c3133986
|
4
|
+
data.tar.gz: ce38ff48bea0d197a6bb73a611bdc32256c7a2cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
11
|
-
activesupport (= 5.0
|
12
|
-
activerecord (5.0
|
13
|
-
activemodel (= 5.0
|
14
|
-
activesupport (= 5.0
|
15
|
-
arel (~>
|
16
|
-
activesupport (5.0
|
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 (
|
22
|
-
concurrent-ruby (1.0.
|
23
|
-
i18n (0.8.
|
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.
|
26
|
-
tzinfo (1.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
|
34
|
-
dump.gsub!(/^ id bigint NOT NULL
|
35
|
-
dump.gsub!(/^ id uuid DEFAULT uuid_generate_v4\(\) NOT NULL
|
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\);$/, '')
|
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.
|
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-
|
11
|
+
date: 2017-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|