postshift 0.2.1 → 0.3.0
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 +4 -4
- data/Appraisals +8 -0
- data/README.md +5 -1
- data/gemfiles/ar_5.0.gemfile +1 -0
- data/gemfiles/ar_5.0.gemfile.lock +27 -25
- data/gemfiles/ar_5.1.gemfile +1 -0
- data/gemfiles/ar_5.1.gemfile.lock +27 -25
- data/gemfiles/ar_5.2.beta.gemfile +9 -0
- data/gemfiles/ar_5.2.beta.gemfile.lock +72 -0
- data/gemfiles/ar_5.2.gemfile +10 -0
- data/gemfiles/ar_5.2.gemfile.lock +164 -0
- data/gemfiles/ar_5.2_beta.gemfile +9 -0
- data/gemfiles/ar_5.2_beta.gemfile.lock +72 -0
- data/lib/active_record/connection_adapters/redshift_adapter.rb +1 -1
- data/lib/postshift/version.rb +1 -1
- data/lib/tasks/v_generate_tbl_ddl.sql +8 -7
- data/lib/tasks/v_generate_view_ddl.sql +8 -6
- data/postshift.gemspec +3 -3
- metadata +12 -12
- data/circle.yml +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89767224483b00b48a2bec2b34b1987cbfbcc2b0
|
|
4
|
+
data.tar.gz: e2dda97f1a6273344b5086b44a005a104321ca36
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb536aa4a2d974f8b01abeec69525eef326c5ad44bb8f587fa13b2acbcac70431f86724f6f6f1d2c1343e75fa845b4489181e080e7127999b7bbc13cdaed3632
|
|
7
|
+
data.tar.gz: 11a3d8c4e862a41493448cb99596c1e9fd388694962d03b4a31d969a24fb4754815174c31047c14938c69ff27523e05dc8ecda6efbed34c5a7adee1e91ab3734
|
data/Appraisals
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
appraise 'ar-5.0' do
|
|
2
|
+
gem 'pg', '~> 0.20.0'
|
|
2
3
|
gem 'activerecord', '5.0.2'
|
|
3
4
|
gem 'activesupport', '5.0.2'
|
|
4
5
|
end
|
|
5
6
|
|
|
6
7
|
appraise 'ar-5.1' do
|
|
8
|
+
gem 'pg', '~> 0.20.0'
|
|
7
9
|
gem 'activerecord', '5.1.0'
|
|
8
10
|
gem 'activesupport', '5.1.0'
|
|
9
11
|
end
|
|
12
|
+
|
|
13
|
+
appraise 'ar-5.2' do
|
|
14
|
+
gem 'pg', '~> 1.0.0'
|
|
15
|
+
gem 'activerecord', '5.2.0'
|
|
16
|
+
gem 'activesupport', '5.2.0'
|
|
17
|
+
end
|
data/README.md
CHANGED
|
@@ -4,7 +4,10 @@ Amazon Redshift extension for ActiveRecord 5 (Rails 5) PostgreSQL adapter based
|
|
|
4
4
|
|
|
5
5
|
1. Function as an extension of the PostgreSQL ActiveRecord adapter. Overriding or extending as needed to properly account for the differences between PostgreSQL and Redshift.
|
|
6
6
|
2. Create a functioning test suite.
|
|
7
|
-
3.
|
|
7
|
+
3. Support the following versions of ActiveRecord:
|
|
8
|
+
* 5.0
|
|
9
|
+
* 5.1
|
|
10
|
+
* 5.2
|
|
8
11
|
|
|
9
12
|
<https://github.com/ConsultingMD/activerecord5-redshift-adapter>
|
|
10
13
|
|
|
@@ -117,6 +120,7 @@ Additionally, there is multi-version test support through [Appraisal](https://gi
|
|
|
117
120
|
appraisal install
|
|
118
121
|
appraisal ar-5.0 rake spec
|
|
119
122
|
appraisal ar-5.1 rake spec
|
|
123
|
+
appraisal ar-5.2 rake spec
|
|
120
124
|
```
|
|
121
125
|
|
|
122
126
|
## Contributing
|
data/gemfiles/ar_5.0.gemfile
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
postshift (0.1
|
|
5
|
-
activerecord (
|
|
6
|
-
activesupport (
|
|
7
|
-
pg (
|
|
4
|
+
postshift (0.2.1)
|
|
5
|
+
activerecord (~> 5.0)
|
|
6
|
+
activesupport (~> 5.0)
|
|
7
|
+
pg (>= 0.20.0)
|
|
8
8
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
@@ -26,30 +26,31 @@ GEM
|
|
|
26
26
|
thor (>= 0.14.0)
|
|
27
27
|
arel (7.1.4)
|
|
28
28
|
concurrent-ruby (1.0.5)
|
|
29
|
-
database_cleaner (1.
|
|
29
|
+
database_cleaner (1.7.0)
|
|
30
30
|
diff-lcs (1.3)
|
|
31
|
-
|
|
31
|
+
factory_bot (4.8.2)
|
|
32
32
|
activesupport (>= 3.0.0)
|
|
33
|
-
i18n (0.
|
|
34
|
-
|
|
33
|
+
i18n (0.9.1)
|
|
34
|
+
concurrent-ruby (~> 1.0)
|
|
35
|
+
minitest (5.11.1)
|
|
35
36
|
pg (0.20.0)
|
|
36
37
|
rake (10.5.0)
|
|
37
|
-
rspec (3.
|
|
38
|
-
rspec-core (~> 3.
|
|
39
|
-
rspec-expectations (~> 3.
|
|
40
|
-
rspec-mocks (~> 3.
|
|
41
|
-
rspec-core (3.
|
|
42
|
-
rspec-support (~> 3.
|
|
43
|
-
rspec-expectations (3.
|
|
38
|
+
rspec (3.7.0)
|
|
39
|
+
rspec-core (~> 3.7.0)
|
|
40
|
+
rspec-expectations (~> 3.7.0)
|
|
41
|
+
rspec-mocks (~> 3.7.0)
|
|
42
|
+
rspec-core (3.7.1)
|
|
43
|
+
rspec-support (~> 3.7.0)
|
|
44
|
+
rspec-expectations (3.7.0)
|
|
44
45
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
45
|
-
rspec-support (~> 3.
|
|
46
|
-
rspec-mocks (3.
|
|
46
|
+
rspec-support (~> 3.7.0)
|
|
47
|
+
rspec-mocks (3.7.0)
|
|
47
48
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
48
|
-
rspec-support (~> 3.
|
|
49
|
-
rspec-support (3.
|
|
50
|
-
thor (0.
|
|
49
|
+
rspec-support (~> 3.7.0)
|
|
50
|
+
rspec-support (3.7.0)
|
|
51
|
+
thor (0.20.0)
|
|
51
52
|
thread_safe (0.3.6)
|
|
52
|
-
tzinfo (1.2.
|
|
53
|
+
tzinfo (1.2.4)
|
|
53
54
|
thread_safe (~> 0.1)
|
|
54
55
|
|
|
55
56
|
PLATFORMS
|
|
@@ -58,13 +59,14 @@ PLATFORMS
|
|
|
58
59
|
DEPENDENCIES
|
|
59
60
|
activerecord (= 5.0.2)
|
|
60
61
|
activesupport (= 5.0.2)
|
|
61
|
-
appraisal (~> 2.2
|
|
62
|
+
appraisal (~> 2.2)
|
|
62
63
|
bundler (~> 1.14)
|
|
63
|
-
database_cleaner (~> 1.
|
|
64
|
-
|
|
64
|
+
database_cleaner (~> 1.7)
|
|
65
|
+
factory_bot (~> 4.8)
|
|
66
|
+
pg (~> 0.20.0)
|
|
65
67
|
postshift!
|
|
66
68
|
rake (~> 10.0)
|
|
67
69
|
rspec (~> 3.0)
|
|
68
70
|
|
|
69
71
|
BUNDLED WITH
|
|
70
|
-
1.
|
|
72
|
+
1.16.1
|
data/gemfiles/ar_5.1.gemfile
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
postshift (0.1
|
|
5
|
-
activerecord (
|
|
6
|
-
activesupport (
|
|
7
|
-
pg (
|
|
4
|
+
postshift (0.2.1)
|
|
5
|
+
activerecord (~> 5.0)
|
|
6
|
+
activesupport (~> 5.0)
|
|
7
|
+
pg (>= 0.20.0)
|
|
8
8
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
@@ -26,30 +26,31 @@ GEM
|
|
|
26
26
|
thor (>= 0.14.0)
|
|
27
27
|
arel (8.0.0)
|
|
28
28
|
concurrent-ruby (1.0.5)
|
|
29
|
-
database_cleaner (1.
|
|
29
|
+
database_cleaner (1.7.0)
|
|
30
30
|
diff-lcs (1.3)
|
|
31
|
-
|
|
31
|
+
factory_bot (4.8.2)
|
|
32
32
|
activesupport (>= 3.0.0)
|
|
33
|
-
i18n (0.
|
|
34
|
-
|
|
33
|
+
i18n (0.9.1)
|
|
34
|
+
concurrent-ruby (~> 1.0)
|
|
35
|
+
minitest (5.11.1)
|
|
35
36
|
pg (0.20.0)
|
|
36
37
|
rake (10.5.0)
|
|
37
|
-
rspec (3.
|
|
38
|
-
rspec-core (~> 3.
|
|
39
|
-
rspec-expectations (~> 3.
|
|
40
|
-
rspec-mocks (~> 3.
|
|
41
|
-
rspec-core (3.
|
|
42
|
-
rspec-support (~> 3.
|
|
43
|
-
rspec-expectations (3.
|
|
38
|
+
rspec (3.7.0)
|
|
39
|
+
rspec-core (~> 3.7.0)
|
|
40
|
+
rspec-expectations (~> 3.7.0)
|
|
41
|
+
rspec-mocks (~> 3.7.0)
|
|
42
|
+
rspec-core (3.7.1)
|
|
43
|
+
rspec-support (~> 3.7.0)
|
|
44
|
+
rspec-expectations (3.7.0)
|
|
44
45
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
45
|
-
rspec-support (~> 3.
|
|
46
|
-
rspec-mocks (3.
|
|
46
|
+
rspec-support (~> 3.7.0)
|
|
47
|
+
rspec-mocks (3.7.0)
|
|
47
48
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
48
|
-
rspec-support (~> 3.
|
|
49
|
-
rspec-support (3.
|
|
50
|
-
thor (0.
|
|
49
|
+
rspec-support (~> 3.7.0)
|
|
50
|
+
rspec-support (3.7.0)
|
|
51
|
+
thor (0.20.0)
|
|
51
52
|
thread_safe (0.3.6)
|
|
52
|
-
tzinfo (1.2.
|
|
53
|
+
tzinfo (1.2.4)
|
|
53
54
|
thread_safe (~> 0.1)
|
|
54
55
|
|
|
55
56
|
PLATFORMS
|
|
@@ -58,13 +59,14 @@ PLATFORMS
|
|
|
58
59
|
DEPENDENCIES
|
|
59
60
|
activerecord (= 5.1.0)
|
|
60
61
|
activesupport (= 5.1.0)
|
|
61
|
-
appraisal (~> 2.2
|
|
62
|
+
appraisal (~> 2.2)
|
|
62
63
|
bundler (~> 1.14)
|
|
63
|
-
database_cleaner (~> 1.
|
|
64
|
-
|
|
64
|
+
database_cleaner (~> 1.7)
|
|
65
|
+
factory_bot (~> 4.8)
|
|
66
|
+
pg (~> 0.20.0)
|
|
65
67
|
postshift!
|
|
66
68
|
rake (~> 10.0)
|
|
67
69
|
rspec (~> 3.0)
|
|
68
70
|
|
|
69
71
|
BUNDLED WITH
|
|
70
|
-
1.
|
|
72
|
+
1.16.1
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: ..
|
|
3
|
+
specs:
|
|
4
|
+
postshift (0.2.0)
|
|
5
|
+
activerecord (~> 5.0)
|
|
6
|
+
activesupport (~> 5.0)
|
|
7
|
+
pg (>= 0.20.0)
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
activemodel (5.2.0.beta2)
|
|
13
|
+
activesupport (= 5.2.0.beta2)
|
|
14
|
+
activerecord (5.2.0.beta2)
|
|
15
|
+
activemodel (= 5.2.0.beta2)
|
|
16
|
+
activesupport (= 5.2.0.beta2)
|
|
17
|
+
arel (>= 9.0)
|
|
18
|
+
activesupport (5.2.0.beta2)
|
|
19
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
20
|
+
i18n (~> 0.7)
|
|
21
|
+
minitest (~> 5.1)
|
|
22
|
+
tzinfo (~> 1.1)
|
|
23
|
+
appraisal (2.2.0)
|
|
24
|
+
bundler
|
|
25
|
+
rake
|
|
26
|
+
thor (>= 0.14.0)
|
|
27
|
+
arel (9.0.0)
|
|
28
|
+
concurrent-ruby (1.0.5)
|
|
29
|
+
database_cleaner (1.6.2)
|
|
30
|
+
diff-lcs (1.3)
|
|
31
|
+
factory_girl (4.9.0)
|
|
32
|
+
activesupport (>= 3.0.0)
|
|
33
|
+
i18n (0.9.1)
|
|
34
|
+
concurrent-ruby (~> 1.0)
|
|
35
|
+
minitest (5.11.1)
|
|
36
|
+
pg (1.0.0)
|
|
37
|
+
rake (10.5.0)
|
|
38
|
+
rspec (3.7.0)
|
|
39
|
+
rspec-core (~> 3.7.0)
|
|
40
|
+
rspec-expectations (~> 3.7.0)
|
|
41
|
+
rspec-mocks (~> 3.7.0)
|
|
42
|
+
rspec-core (3.7.1)
|
|
43
|
+
rspec-support (~> 3.7.0)
|
|
44
|
+
rspec-expectations (3.7.0)
|
|
45
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
46
|
+
rspec-support (~> 3.7.0)
|
|
47
|
+
rspec-mocks (3.7.0)
|
|
48
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
49
|
+
rspec-support (~> 3.7.0)
|
|
50
|
+
rspec-support (3.7.0)
|
|
51
|
+
thor (0.20.0)
|
|
52
|
+
thread_safe (0.3.6)
|
|
53
|
+
tzinfo (1.2.4)
|
|
54
|
+
thread_safe (~> 0.1)
|
|
55
|
+
|
|
56
|
+
PLATFORMS
|
|
57
|
+
ruby
|
|
58
|
+
|
|
59
|
+
DEPENDENCIES
|
|
60
|
+
activerecord (= 5.2.0.beta2)
|
|
61
|
+
activesupport (= 5.2.0.beta2)
|
|
62
|
+
appraisal (~> 2.2)
|
|
63
|
+
bundler (~> 1.14)
|
|
64
|
+
database_cleaner (~> 1.6)
|
|
65
|
+
factory_girl (~> 4.8)
|
|
66
|
+
pg (~> 1.0.0)
|
|
67
|
+
postshift!
|
|
68
|
+
rake (~> 10.0)
|
|
69
|
+
rspec (~> 3.0)
|
|
70
|
+
|
|
71
|
+
BUNDLED WITH
|
|
72
|
+
1.16.1
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
GIT
|
|
2
|
+
remote: https://github.com/rails/rails
|
|
3
|
+
revision: 4c0cb1c2c9269c74588da9f114f52ea3707ae8fb
|
|
4
|
+
specs:
|
|
5
|
+
actioncable (5.2.0.beta2)
|
|
6
|
+
actionpack (= 5.2.0.beta2)
|
|
7
|
+
nio4r (~> 2.0)
|
|
8
|
+
websocket-driver (~> 0.6.1)
|
|
9
|
+
actionmailer (5.2.0.beta2)
|
|
10
|
+
actionpack (= 5.2.0.beta2)
|
|
11
|
+
actionview (= 5.2.0.beta2)
|
|
12
|
+
activejob (= 5.2.0.beta2)
|
|
13
|
+
mail (~> 2.5, >= 2.5.4)
|
|
14
|
+
rails-dom-testing (~> 2.0)
|
|
15
|
+
actionpack (5.2.0.beta2)
|
|
16
|
+
actionview (= 5.2.0.beta2)
|
|
17
|
+
activesupport (= 5.2.0.beta2)
|
|
18
|
+
rack (~> 2.0)
|
|
19
|
+
rack-test (>= 0.6.3)
|
|
20
|
+
rails-dom-testing (~> 2.0)
|
|
21
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
22
|
+
actionview (5.2.0.beta2)
|
|
23
|
+
activesupport (= 5.2.0.beta2)
|
|
24
|
+
builder (~> 3.1)
|
|
25
|
+
erubi (~> 1.4)
|
|
26
|
+
rails-dom-testing (~> 2.0)
|
|
27
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
28
|
+
activejob (5.2.0.beta2)
|
|
29
|
+
activesupport (= 5.2.0.beta2)
|
|
30
|
+
globalid (>= 0.3.6)
|
|
31
|
+
activemodel (5.2.0.beta2)
|
|
32
|
+
activesupport (= 5.2.0.beta2)
|
|
33
|
+
activerecord (5.2.0.beta2)
|
|
34
|
+
activemodel (= 5.2.0.beta2)
|
|
35
|
+
activesupport (= 5.2.0.beta2)
|
|
36
|
+
arel (>= 9.0)
|
|
37
|
+
activestorage (5.2.0.beta2)
|
|
38
|
+
actionpack (= 5.2.0.beta2)
|
|
39
|
+
activerecord (= 5.2.0.beta2)
|
|
40
|
+
marcel (~> 0.3.1)
|
|
41
|
+
activesupport (5.2.0.beta2)
|
|
42
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
43
|
+
i18n (~> 0.7)
|
|
44
|
+
minitest (~> 5.1)
|
|
45
|
+
tzinfo (~> 1.1)
|
|
46
|
+
rails (5.2.0.beta2)
|
|
47
|
+
actioncable (= 5.2.0.beta2)
|
|
48
|
+
actionmailer (= 5.2.0.beta2)
|
|
49
|
+
actionpack (= 5.2.0.beta2)
|
|
50
|
+
actionview (= 5.2.0.beta2)
|
|
51
|
+
activejob (= 5.2.0.beta2)
|
|
52
|
+
activemodel (= 5.2.0.beta2)
|
|
53
|
+
activerecord (= 5.2.0.beta2)
|
|
54
|
+
activestorage (= 5.2.0.beta2)
|
|
55
|
+
activesupport (= 5.2.0.beta2)
|
|
56
|
+
bundler (>= 1.3.0)
|
|
57
|
+
railties (= 5.2.0.beta2)
|
|
58
|
+
sprockets-rails (>= 2.0.0)
|
|
59
|
+
railties (5.2.0.beta2)
|
|
60
|
+
actionpack (= 5.2.0.beta2)
|
|
61
|
+
activesupport (= 5.2.0.beta2)
|
|
62
|
+
method_source
|
|
63
|
+
rake (>= 0.8.7)
|
|
64
|
+
thor (>= 0.18.1, < 2.0)
|
|
65
|
+
|
|
66
|
+
PATH
|
|
67
|
+
remote: ..
|
|
68
|
+
specs:
|
|
69
|
+
postshift (0.2.1)
|
|
70
|
+
activerecord (~> 5.0)
|
|
71
|
+
activesupport (~> 5.0)
|
|
72
|
+
pg (>= 0.20.0)
|
|
73
|
+
|
|
74
|
+
GEM
|
|
75
|
+
remote: https://rubygems.org/
|
|
76
|
+
specs:
|
|
77
|
+
appraisal (2.2.0)
|
|
78
|
+
bundler
|
|
79
|
+
rake
|
|
80
|
+
thor (>= 0.14.0)
|
|
81
|
+
arel (9.0.0)
|
|
82
|
+
builder (3.2.3)
|
|
83
|
+
concurrent-ruby (1.0.5)
|
|
84
|
+
crass (1.0.3)
|
|
85
|
+
database_cleaner (1.7.0)
|
|
86
|
+
diff-lcs (1.3)
|
|
87
|
+
erubi (1.7.0)
|
|
88
|
+
factory_bot (4.8.2)
|
|
89
|
+
activesupport (>= 3.0.0)
|
|
90
|
+
globalid (0.4.1)
|
|
91
|
+
activesupport (>= 4.2.0)
|
|
92
|
+
i18n (0.9.1)
|
|
93
|
+
concurrent-ruby (~> 1.0)
|
|
94
|
+
loofah (2.1.1)
|
|
95
|
+
crass (~> 1.0.2)
|
|
96
|
+
nokogiri (>= 1.5.9)
|
|
97
|
+
mail (2.7.0)
|
|
98
|
+
mini_mime (>= 0.1.1)
|
|
99
|
+
marcel (0.3.1)
|
|
100
|
+
mimemagic (~> 0.3.2)
|
|
101
|
+
method_source (0.9.0)
|
|
102
|
+
mimemagic (0.3.2)
|
|
103
|
+
mini_mime (1.0.0)
|
|
104
|
+
mini_portile2 (2.3.0)
|
|
105
|
+
minitest (5.11.1)
|
|
106
|
+
nio4r (2.2.0)
|
|
107
|
+
nokogiri (1.8.1)
|
|
108
|
+
mini_portile2 (~> 2.3.0)
|
|
109
|
+
pg (1.0.0)
|
|
110
|
+
rack (2.0.3)
|
|
111
|
+
rack-test (0.8.2)
|
|
112
|
+
rack (>= 1.0, < 3)
|
|
113
|
+
rails-dom-testing (2.0.3)
|
|
114
|
+
activesupport (>= 4.2.0)
|
|
115
|
+
nokogiri (>= 1.6)
|
|
116
|
+
rails-html-sanitizer (1.0.3)
|
|
117
|
+
loofah (~> 2.0)
|
|
118
|
+
rake (10.5.0)
|
|
119
|
+
rspec (3.7.0)
|
|
120
|
+
rspec-core (~> 3.7.0)
|
|
121
|
+
rspec-expectations (~> 3.7.0)
|
|
122
|
+
rspec-mocks (~> 3.7.0)
|
|
123
|
+
rspec-core (3.7.1)
|
|
124
|
+
rspec-support (~> 3.7.0)
|
|
125
|
+
rspec-expectations (3.7.0)
|
|
126
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
127
|
+
rspec-support (~> 3.7.0)
|
|
128
|
+
rspec-mocks (3.7.0)
|
|
129
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
130
|
+
rspec-support (~> 3.7.0)
|
|
131
|
+
rspec-support (3.7.0)
|
|
132
|
+
sprockets (3.7.1)
|
|
133
|
+
concurrent-ruby (~> 1.0)
|
|
134
|
+
rack (> 1, < 3)
|
|
135
|
+
sprockets-rails (3.2.1)
|
|
136
|
+
actionpack (>= 4.0)
|
|
137
|
+
activesupport (>= 4.0)
|
|
138
|
+
sprockets (>= 3.0.0)
|
|
139
|
+
thor (0.20.0)
|
|
140
|
+
thread_safe (0.3.6)
|
|
141
|
+
tzinfo (1.2.4)
|
|
142
|
+
thread_safe (~> 0.1)
|
|
143
|
+
websocket-driver (0.6.5)
|
|
144
|
+
websocket-extensions (>= 0.1.0)
|
|
145
|
+
websocket-extensions (0.1.3)
|
|
146
|
+
|
|
147
|
+
PLATFORMS
|
|
148
|
+
ruby
|
|
149
|
+
|
|
150
|
+
DEPENDENCIES
|
|
151
|
+
activerecord
|
|
152
|
+
activesupport
|
|
153
|
+
appraisal (~> 2.2)
|
|
154
|
+
bundler (~> 1.14)
|
|
155
|
+
database_cleaner (~> 1.7)
|
|
156
|
+
factory_bot (~> 4.8)
|
|
157
|
+
pg (~> 1.0.0)
|
|
158
|
+
postshift!
|
|
159
|
+
rails!
|
|
160
|
+
rake (~> 10.0)
|
|
161
|
+
rspec (~> 3.0)
|
|
162
|
+
|
|
163
|
+
BUNDLED WITH
|
|
164
|
+
1.16.1
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: ..
|
|
3
|
+
specs:
|
|
4
|
+
postshift (0.2.0)
|
|
5
|
+
activerecord (~> 5.0)
|
|
6
|
+
activesupport (~> 5.0)
|
|
7
|
+
pg (>= 0.20.0)
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
activemodel (5.2.0.beta2)
|
|
13
|
+
activesupport (= 5.2.0.beta2)
|
|
14
|
+
activerecord (5.2.0.beta2)
|
|
15
|
+
activemodel (= 5.2.0.beta2)
|
|
16
|
+
activesupport (= 5.2.0.beta2)
|
|
17
|
+
arel (>= 9.0)
|
|
18
|
+
activesupport (5.2.0.beta2)
|
|
19
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
20
|
+
i18n (~> 0.7)
|
|
21
|
+
minitest (~> 5.1)
|
|
22
|
+
tzinfo (~> 1.1)
|
|
23
|
+
appraisal (2.2.0)
|
|
24
|
+
bundler
|
|
25
|
+
rake
|
|
26
|
+
thor (>= 0.14.0)
|
|
27
|
+
arel (9.0.0)
|
|
28
|
+
concurrent-ruby (1.0.5)
|
|
29
|
+
database_cleaner (1.6.2)
|
|
30
|
+
diff-lcs (1.3)
|
|
31
|
+
factory_girl (4.9.0)
|
|
32
|
+
activesupport (>= 3.0.0)
|
|
33
|
+
i18n (0.9.1)
|
|
34
|
+
concurrent-ruby (~> 1.0)
|
|
35
|
+
minitest (5.11.1)
|
|
36
|
+
pg (1.0.0)
|
|
37
|
+
rake (10.5.0)
|
|
38
|
+
rspec (3.7.0)
|
|
39
|
+
rspec-core (~> 3.7.0)
|
|
40
|
+
rspec-expectations (~> 3.7.0)
|
|
41
|
+
rspec-mocks (~> 3.7.0)
|
|
42
|
+
rspec-core (3.7.1)
|
|
43
|
+
rspec-support (~> 3.7.0)
|
|
44
|
+
rspec-expectations (3.7.0)
|
|
45
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
46
|
+
rspec-support (~> 3.7.0)
|
|
47
|
+
rspec-mocks (3.7.0)
|
|
48
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
49
|
+
rspec-support (~> 3.7.0)
|
|
50
|
+
rspec-support (3.7.0)
|
|
51
|
+
thor (0.20.0)
|
|
52
|
+
thread_safe (0.3.6)
|
|
53
|
+
tzinfo (1.2.4)
|
|
54
|
+
thread_safe (~> 0.1)
|
|
55
|
+
|
|
56
|
+
PLATFORMS
|
|
57
|
+
ruby
|
|
58
|
+
|
|
59
|
+
DEPENDENCIES
|
|
60
|
+
activerecord (= 5.2.0.beta2)
|
|
61
|
+
activesupport (= 5.2.0.beta2)
|
|
62
|
+
appraisal (~> 2.2)
|
|
63
|
+
bundler (~> 1.14)
|
|
64
|
+
database_cleaner (~> 1.6)
|
|
65
|
+
factory_girl (~> 4.8)
|
|
66
|
+
pg (~> 1.0.0)
|
|
67
|
+
postshift!
|
|
68
|
+
rake (~> 10.0)
|
|
69
|
+
rspec (~> 3.0)
|
|
70
|
+
|
|
71
|
+
BUNDLED WITH
|
|
72
|
+
1.16.1
|
|
@@ -131,7 +131,7 @@ module ActiveRecord
|
|
|
131
131
|
private
|
|
132
132
|
|
|
133
133
|
# Copied from PostgreSQL with minor registration changes. If broken out, could override segments, etc
|
|
134
|
-
def initialize_type_map(m) # :nodoc:
|
|
134
|
+
def initialize_type_map(m = type_map) # :nodoc:
|
|
135
135
|
register_class_with_limit m, 'int2', Type::Integer
|
|
136
136
|
register_class_with_limit m, 'int4', Type::Integer
|
|
137
137
|
register_class_with_limit m, 'int8', Type::Integer
|
data/lib/postshift/version.rb
CHANGED
|
@@ -41,6 +41,7 @@ History:
|
|
|
41
41
|
2015-10-31 ericfe Added cast tp increase size of returning constraint name
|
|
42
42
|
2016-05-24 chriz-bigdata Added support for BACKUP NO tables
|
|
43
43
|
2017-05-03 pvbouwel Change table & schemaname of Foreign key constraints to allow for filters
|
|
44
|
+
2018-01-15 pvbouwel Add QUOTE_IDENT for identifiers (schema,table and column names)
|
|
44
45
|
**********************************************************************************************/
|
|
45
46
|
CREATE OR REPLACE VIEW admin.v_generate_tbl_ddl
|
|
46
47
|
AS
|
|
@@ -63,7 +64,7 @@ FROM
|
|
|
63
64
|
n.nspname AS schemaname
|
|
64
65
|
,c.relname AS tablename
|
|
65
66
|
,0 AS seq
|
|
66
|
-
,'--DROP TABLE
|
|
67
|
+
,'--DROP TABLE ' + QUOTE_IDENT(n.nspname) + '.' + QUOTE_IDENT(c.relname) + ';' AS ddl
|
|
67
68
|
FROM pg_namespace AS n
|
|
68
69
|
INNER JOIN pg_class AS c ON n.oid = c.relnamespace
|
|
69
70
|
WHERE c.relkind = 'r'
|
|
@@ -72,7 +73,7 @@ FROM
|
|
|
72
73
|
n.nspname AS schemaname
|
|
73
74
|
,c.relname AS tablename
|
|
74
75
|
,2 AS seq
|
|
75
|
-
,'CREATE TABLE IF NOT EXISTS
|
|
76
|
+
,'CREATE TABLE IF NOT EXISTS ' + QUOTE_IDENT(n.nspname) + '.' + QUOTE_IDENT(c.relname) + '' AS ddl
|
|
76
77
|
FROM pg_namespace AS n
|
|
77
78
|
INNER JOIN pg_class AS c ON n.oid = c.relnamespace
|
|
78
79
|
WHERE c.relkind = 'r'
|
|
@@ -94,7 +95,7 @@ FROM
|
|
|
94
95
|
,c.relname AS tablename
|
|
95
96
|
,100000000 + a.attnum AS seq
|
|
96
97
|
,CASE WHEN a.attnum > 1 THEN ',' ELSE '' END AS col_delim
|
|
97
|
-
,
|
|
98
|
+
,QUOTE_IDENT(a.attname) AS col_name
|
|
98
99
|
,CASE WHEN STRPOS(UPPER(format_type(a.atttypid, a.atttypmod)), 'CHARACTER VARYING') > 0
|
|
99
100
|
THEN REPLACE(UPPER(format_type(a.atttypid, a.atttypmod)), 'CHARACTER VARYING', 'VARCHAR')
|
|
100
101
|
WHEN STRPOS(UPPER(format_type(a.atttypid, a.atttypmod)), 'CHARACTER') > 0
|
|
@@ -183,7 +184,7 @@ FROM pg_namespace AS n
|
|
|
183
184
|
n.nspname AS schemaname
|
|
184
185
|
,c.relname AS tablename
|
|
185
186
|
,400000000 + a.attnum AS seq
|
|
186
|
-
,'DISTKEY (
|
|
187
|
+
,'DISTKEY (' + QUOTE_IDENT(a.attname) + ')' AS ddl
|
|
187
188
|
FROM pg_namespace AS n
|
|
188
189
|
INNER JOIN pg_class AS c ON n.oid = c.relnamespace
|
|
189
190
|
INNER JOIN pg_attribute AS a ON c.oid = a.attrelid
|
|
@@ -209,8 +210,8 @@ from (SELECT
|
|
|
209
210
|
,c.relname AS tablename
|
|
210
211
|
,500000000 + abs(a.attsortkeyord) AS seq
|
|
211
212
|
,CASE WHEN abs(a.attsortkeyord) = 1
|
|
212
|
-
THEN '\t
|
|
213
|
-
ELSE '\t,
|
|
213
|
+
THEN '\t' + QUOTE_IDENT(a.attname)
|
|
214
|
+
ELSE '\t, ' + QUOTE_IDENT(a.attname)
|
|
214
215
|
END AS ddl
|
|
215
216
|
FROM pg_namespace AS n
|
|
216
217
|
INNER JOIN pg_class AS c ON n.oid = c.relnamespace
|
|
@@ -239,7 +240,7 @@ from (SELECT
|
|
|
239
240
|
SELECT 'zzzzzzzz' || n.nspname AS schemaname,
|
|
240
241
|
'zzzzzzzz' || c.relname AS tablename,
|
|
241
242
|
700000000 + CAST(con.oid AS INT) AS seq,
|
|
242
|
-
'ALTER TABLE ' + n.nspname + '.' + c.relname + ' ADD ' + pg_get_constraintdef(con.oid)::VARCHAR(1024) + ';' AS ddl
|
|
243
|
+
'ALTER TABLE ' + QUOTE_IDENT(n.nspname) + '.' + QUOTE_IDENT(c.relname) + ' ADD ' + pg_get_constraintdef(con.oid)::VARCHAR(1024) + ';' AS ddl
|
|
243
244
|
FROM pg_constraint AS con
|
|
244
245
|
INNER JOIN pg_class AS c
|
|
245
246
|
ON c.relnamespace = con.connamespace
|
|
@@ -3,17 +3,19 @@
|
|
|
3
3
|
Purpose: View to get the DDL for a view.
|
|
4
4
|
History:
|
|
5
5
|
2014-02-10 jjschmit Created
|
|
6
|
+
2018-01-15 pvbouwel Replace tabs and add QUOTE_IDENT for identifiers (schema and view names)
|
|
6
7
|
**********************************************************************************************/
|
|
7
8
|
CREATE OR REPLACE VIEW admin.v_generate_view_ddl
|
|
8
9
|
AS
|
|
9
10
|
SELECT
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
n.nspname AS schemaname
|
|
12
|
+
,c.relname AS viewname
|
|
13
|
+
,'--DROP VIEW ' + QUOTE_IDENT(n.nspname) + '.' + QUOTE_IDENT(c.relname) + ';\n'
|
|
14
|
+
+ 'CREATE OR REPLACE VIEW ' + QUOTE_IDENT(n.nspname) + '.' + QUOTE_IDENT(c.relname) + ' AS\n' + COALESCE(pg_get_viewdef(c.oid, TRUE), '') AS ddl
|
|
13
15
|
FROM
|
|
14
|
-
|
|
16
|
+
pg_catalog.pg_class AS c
|
|
15
17
|
INNER JOIN
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
pg_catalog.pg_namespace AS n
|
|
19
|
+
ON c.relnamespace = n.oid
|
|
18
20
|
WHERE relkind = 'v'
|
|
19
21
|
;
|
data/postshift.gemspec
CHANGED
|
@@ -24,14 +24,14 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
|
|
25
25
|
spec.required_ruby_version = '>= 2.2.2'
|
|
26
26
|
|
|
27
|
-
spec.add_dependency 'pg', '
|
|
27
|
+
spec.add_dependency 'pg', '>= 0.20.0'
|
|
28
28
|
spec.add_dependency 'activerecord', '~> 5.0'
|
|
29
29
|
spec.add_dependency 'activesupport', '~> 5.0'
|
|
30
30
|
|
|
31
31
|
spec.add_development_dependency 'bundler', '~> 1.14'
|
|
32
32
|
spec.add_development_dependency 'rake', '~> 10.0'
|
|
33
33
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
34
|
-
spec.add_development_dependency '
|
|
35
|
-
spec.add_development_dependency 'database_cleaner', '~> 1.
|
|
34
|
+
spec.add_development_dependency 'factory_bot', '~> 4.8'
|
|
35
|
+
spec.add_development_dependency 'database_cleaner', '~> 1.7'
|
|
36
36
|
spec.add_development_dependency 'appraisal', '~> 2.2'
|
|
37
37
|
end
|
metadata
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: postshift
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dave Krupinski
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-05-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pg
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0.20'
|
|
20
17
|
- - ">="
|
|
21
18
|
- !ruby/object:Gem::Version
|
|
22
19
|
version: 0.20.0
|
|
@@ -24,9 +21,6 @@ dependencies:
|
|
|
24
21
|
prerelease: false
|
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
23
|
requirements:
|
|
27
|
-
- - "~>"
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: '0.20'
|
|
30
24
|
- - ">="
|
|
31
25
|
- !ruby/object:Gem::Version
|
|
32
26
|
version: 0.20.0
|
|
@@ -101,7 +95,7 @@ dependencies:
|
|
|
101
95
|
- !ruby/object:Gem::Version
|
|
102
96
|
version: '3.0'
|
|
103
97
|
- !ruby/object:Gem::Dependency
|
|
104
|
-
name:
|
|
98
|
+
name: factory_bot
|
|
105
99
|
requirement: !ruby/object:Gem::Requirement
|
|
106
100
|
requirements:
|
|
107
101
|
- - "~>"
|
|
@@ -120,14 +114,14 @@ dependencies:
|
|
|
120
114
|
requirements:
|
|
121
115
|
- - "~>"
|
|
122
116
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: '1.
|
|
117
|
+
version: '1.7'
|
|
124
118
|
type: :development
|
|
125
119
|
prerelease: false
|
|
126
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
127
121
|
requirements:
|
|
128
122
|
- - "~>"
|
|
129
123
|
- !ruby/object:Gem::Version
|
|
130
|
-
version: '1.
|
|
124
|
+
version: '1.7'
|
|
131
125
|
- !ruby/object:Gem::Dependency
|
|
132
126
|
name: appraisal
|
|
133
127
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -150,6 +144,7 @@ executables: []
|
|
|
150
144
|
extensions: []
|
|
151
145
|
extra_rdoc_files: []
|
|
152
146
|
files:
|
|
147
|
+
- ".circleci/config.yml"
|
|
153
148
|
- ".codeclimate.yml"
|
|
154
149
|
- ".gitignore"
|
|
155
150
|
- ".rspec"
|
|
@@ -162,12 +157,17 @@ files:
|
|
|
162
157
|
- Rakefile
|
|
163
158
|
- bin/console
|
|
164
159
|
- bin/setup
|
|
165
|
-
- circle.yml
|
|
166
160
|
- gemfiles/.bundle/config
|
|
167
161
|
- gemfiles/ar_5.0.gemfile
|
|
168
162
|
- gemfiles/ar_5.0.gemfile.lock
|
|
169
163
|
- gemfiles/ar_5.1.gemfile
|
|
170
164
|
- gemfiles/ar_5.1.gemfile.lock
|
|
165
|
+
- gemfiles/ar_5.2.beta.gemfile
|
|
166
|
+
- gemfiles/ar_5.2.beta.gemfile.lock
|
|
167
|
+
- gemfiles/ar_5.2.gemfile
|
|
168
|
+
- gemfiles/ar_5.2.gemfile.lock
|
|
169
|
+
- gemfiles/ar_5.2_beta.gemfile
|
|
170
|
+
- gemfiles/ar_5.2_beta.gemfile.lock
|
|
171
171
|
- lib/active_record/connection_adapters/redshift/column.rb
|
|
172
172
|
- lib/active_record/connection_adapters/redshift/referential_integrity.rb
|
|
173
173
|
- lib/active_record/connection_adapters/redshift/schema_definitions.rb
|