MuranoCLI 2.2.1 → 2.2.2
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/lib/MrMurano/commands/postgresql.rb +12 -5
- data/lib/MrMurano/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: be5bab3a80f74484eceb2a27955c65e17d23c941
|
4
|
+
data.tar.gz: 67cf34d12274c93ec33d21dbabdf8c0640ccee3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9955d48707bd068ad302f209e35c4a3ed01b970ba06cad965c84d70189d87468843ff60314830e6026a7c2d4f918df5c3d278cb61eb3cc09b092abda68e6dc86
|
7
|
+
data.tar.gz: a8e7a013c2474f38d2a1ffd85c65319bc336ff14aee984ebebe6aaab896ceece378c293f05ec5059dda0226605932ef2605dd20892e39e963b96ace4d9c59e1d
|
@@ -126,10 +126,13 @@ command 'postgresql migrate' do |c|
|
|
126
126
|
migrations.select! do |m|
|
127
127
|
mvrs, _ = File.basename(m).split('-')
|
128
128
|
mvrs = mvrs.to_i
|
129
|
-
|
129
|
+
if direction == 'down' then
|
130
|
+
mvrs <= current_version and mvrs > want_version
|
131
|
+
else
|
132
|
+
mvrs > current_version and mvrs <= want_version
|
133
|
+
end
|
130
134
|
end
|
131
135
|
|
132
|
-
|
133
136
|
# Run migrations.
|
134
137
|
migrations.each do |m|
|
135
138
|
mvrs, _ = File.basename(m).split('-')
|
@@ -143,9 +146,13 @@ command 'postgresql migrate' do |c|
|
|
143
146
|
pg.error "Because: #{ret[:error]}"
|
144
147
|
exit 5
|
145
148
|
else
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
+
if direction == 'down' then
|
150
|
+
pg.queries %{DELETE FROM __murano_cli_migrate__ WHERE version = #{mvrs};
|
151
|
+
COMMIT;}.gsub(/^\s+/,'')
|
152
|
+
else
|
153
|
+
pg.queries %{INSERT INTO __murano_cli_migrate__ values (#{mvrs});
|
154
|
+
COMMIT;}.gsub(/^\s+/,'')
|
155
|
+
end
|
149
156
|
end
|
150
157
|
end
|
151
158
|
end
|
data/lib/MrMurano/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: MuranoCLI
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Conrad Tadpol Tilstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|