webdack-uuid_migration 0.0.3 → 0.0.4
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 +5 -13
- data/README.md +5 -0
- data/lib/webdack/uuid_migration/helpers.rb +1 -1
- data/lib/webdack/uuid_migration/version.rb +1 -1
- data/spec/support/pg_database_helper.rb +1 -1
- metadata +18 -18
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
data.tar.gz: !binary |-
|
|
6
|
-
MzkwYzI3YmYyNjJkOGFjM2Y5M2NjM2ExNTQ5ZTdiMWY1MmY0ODA2NQ==
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 33a74a60315e04ca35628bcbabbfd95697a2bdf7
|
|
4
|
+
data.tar.gz: 8fa31fdae1c08483d0116859e2509f6a46bfb709
|
|
7
5
|
SHA512:
|
|
8
|
-
metadata.gz:
|
|
9
|
-
|
|
10
|
-
MzNmNTY0ODM3YmM1NjY1NGVmNTYxNWI4M2QwNTBlNDQ0MWQ4MzVjNWY2MDc5
|
|
11
|
-
MmFmYzc2NjcwMTVlZWFjNDU5YzI3MzJhOTMzZjQzZDVhMDUwMzI=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
MTJiNWQ5Y2ZhZGYwZTgzZjNkNTZjNmE3ZTY0ZTZhYWVkYWViYzhhNzhiYmE1
|
|
14
|
-
MDUzOTEzYWViMjc0NDE0YzIxMjk2YjU3YTcyOTE3MThjNTNkMmY1ODI5ZTRk
|
|
15
|
-
ZTU3YzExYmNkNjZkNGY2N2UzNTc5NTQwZDg2NThmMDE5NDBhMjE=
|
|
6
|
+
metadata.gz: 242ee108d61056d0f12c73bf20cb5f8619e96809dd917792838809266077315b016d971ea07fe45a6ab803c0e2ae9b54811033ec1959f3c7f5000ffe2465da99
|
|
7
|
+
data.tar.gz: fbf57d9657a977de2eb6cbd0c4cacf526dfe43a9f7be5ed6ba49d57140cb66e79fff6c4e9acd6813961430c9d1cdca8c1366987098b4551026ff40d5ae86d0e6
|
data/README.md
CHANGED
|
@@ -98,6 +98,11 @@ To run the test suite:
|
|
|
98
98
|
# Postgres user must have rights to create/drop database and create extensions.
|
|
99
99
|
$ bundle exec rspec spec
|
|
100
100
|
|
|
101
|
+
## Credits
|
|
102
|
+
|
|
103
|
+
- Users of the Gem
|
|
104
|
+
- [Felix Bünemann](https://github.com/felixbuenemann) for checking compatibility with Rails 4.1
|
|
105
|
+
|
|
101
106
|
## Contributing
|
|
102
107
|
|
|
103
108
|
1. Fork it ( http://github.com/kreatio-sw/webdack-uuid_migration/fork )
|
|
@@ -21,7 +21,7 @@ module Webdack
|
|
|
21
21
|
ALTER COLUMN #{column} SET DATA TYPE UUID USING (#{to_uuid_pg(column)}),
|
|
22
22
|
ALTER COLUMN #{column} SET DEFAULT #{default}}
|
|
23
23
|
|
|
24
|
-
execute %Q{DROP SEQUENCE #{table}_#{column}_seq} rescue nil
|
|
24
|
+
execute %Q{DROP SEQUENCE IF EXISTS #{table}_#{column}_seq} rescue nil
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
# Converts a column to UUID, migrates all data by left padding with 0's
|
|
@@ -13,7 +13,7 @@ def init_database
|
|
|
13
13
|
# drops and create need to be performed with a connection to the 'postgres' (system) database
|
|
14
14
|
ActiveRecord::Base.establish_connection(PG_SPEC.merge('database' => 'postgres', 'schema_search_path' => 'public'))
|
|
15
15
|
# drop the old database (if it exists)
|
|
16
|
-
ActiveRecord::Base.connection.drop_database PG_SPEC[:database]
|
|
16
|
+
ActiveRecord::Base.connection.drop_database PG_SPEC[:database]
|
|
17
17
|
# create new
|
|
18
18
|
ActiveRecord::Base.connection.create_database(PG_SPEC[:database])
|
|
19
19
|
ActiveRecord::Base.establish_connection(PG_SPEC)
|
metadata
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: webdack-uuid_migration
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Deepak Kumar
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-06-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '0'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rake
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- -
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '0'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- -
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: yard
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- -
|
|
45
|
+
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
47
|
version: '0'
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- -
|
|
52
|
+
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: rspec
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- -
|
|
59
|
+
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: '0'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- -
|
|
66
|
+
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: pg
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- -
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: '0'
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- -
|
|
80
|
+
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: activerecord
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
|
-
- - ~>
|
|
87
|
+
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
89
|
version: '4.0'
|
|
90
90
|
type: :runtime
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
|
-
- - ~>
|
|
94
|
+
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '4.0'
|
|
97
97
|
description: Useful helpers to migrate Integer id columns to UUID in PostgreSql. Special
|
|
@@ -102,7 +102,7 @@ executables: []
|
|
|
102
102
|
extensions: []
|
|
103
103
|
extra_rdoc_files: []
|
|
104
104
|
files:
|
|
105
|
-
- .gitignore
|
|
105
|
+
- ".gitignore"
|
|
106
106
|
- Gemfile
|
|
107
107
|
- LICENSE.txt
|
|
108
108
|
- README.md
|
|
@@ -131,17 +131,17 @@ require_paths:
|
|
|
131
131
|
- lib
|
|
132
132
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
133
133
|
requirements:
|
|
134
|
-
- -
|
|
134
|
+
- - ">="
|
|
135
135
|
- !ruby/object:Gem::Version
|
|
136
136
|
version: '0'
|
|
137
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
requirements:
|
|
139
|
-
- -
|
|
139
|
+
- - ">="
|
|
140
140
|
- !ruby/object:Gem::Version
|
|
141
141
|
version: '0'
|
|
142
142
|
requirements: []
|
|
143
143
|
rubyforge_project:
|
|
144
|
-
rubygems_version: 2.
|
|
144
|
+
rubygems_version: 2.2.2
|
|
145
145
|
signing_key:
|
|
146
146
|
specification_version: 4
|
|
147
147
|
summary: Useful helpers to migrate Integer id columns to UUID in PostgreSql.
|