schema-evolution-manager 0.9.53 → 0.9.54
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/sem-apply +3 -3
- data/lib/schema-evolution-manager/apply_util.rb +4 -26
- data/lib/schema-evolution-manager/args.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9ddc3923455520f86e450ced4cbfb288a7988548ae6b30f92cdaa90149fdf18
|
4
|
+
data.tar.gz: 7cf20d30bb1e013afdb8e455143586c807ee7f2cc6c66e10fdf557f69c8a6a49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9efe8e3b9e596632f79435731ddc16a6b0ce310e1748b172709b8438d82450778fc9cce8aa1f1f880681a45d6b648e7cfd6f2ae0b86f80d53620f87353a52bb2
|
7
|
+
data.tar.gz: 5d62cf2f42fb940d0a049f611ea21f83b8cab78e1d4a36e7d4003719ae544d1c4e583306b0da64dcf39eb110cb9d65a45fd9b26f8a7baf0a141b507ecb68080e
|
data/README.md
CHANGED
@@ -133,7 +133,7 @@ There are three ways to install schema evolution manager:
|
|
133
133
|
|
134
134
|
git clone git@github.com:mbryzek/schema-evolution-manager.git
|
135
135
|
cd schema-evolution-manager
|
136
|
-
git checkout 0.9.
|
136
|
+
git checkout 0.9.54
|
137
137
|
ruby ./configure.rb
|
138
138
|
sudo ./install.rb
|
139
139
|
|
data/bin/sem-apply
CHANGED
@@ -15,7 +15,7 @@ require 'tempfile'
|
|
15
15
|
|
16
16
|
load File.join(File.dirname(__FILE__), 'sem-config')
|
17
17
|
|
18
|
-
args = SchemaEvolutionManager::Args.from_stdin(:optional => %w(url host port name user dry_run
|
18
|
+
args = SchemaEvolutionManager::Args.from_stdin(:optional => %w(url host port name user dry_run password set))
|
19
19
|
|
20
20
|
password = if args.password
|
21
21
|
SchemaEvolutionManager::Ask.for_password("Please enter your password: ")
|
@@ -24,11 +24,11 @@ password = if args.password
|
|
24
24
|
end
|
25
25
|
|
26
26
|
db = SchemaEvolutionManager::Db.from_args(args, :password => password)
|
27
|
-
util = SchemaEvolutionManager::ApplyUtil.new(db, :dry_run => args.dry_run || false
|
27
|
+
util = SchemaEvolutionManager::ApplyUtil.new(db, :dry_run => args.dry_run || false)
|
28
28
|
|
29
29
|
begin
|
30
30
|
db.bootstrap!
|
31
|
-
|
31
|
+
|
32
32
|
puts "Upgrading schema for #{db.url}"
|
33
33
|
count = util.apply!("./scripts")
|
34
34
|
if count == 0
|
@@ -8,11 +8,6 @@ module SchemaEvolutionManager
|
|
8
8
|
@dry_run = true
|
9
9
|
end
|
10
10
|
|
11
|
-
@non_interactive = opts.delete(:non_interactive)
|
12
|
-
if @non_interactive.nil?
|
13
|
-
@non_interactive = false
|
14
|
-
end
|
15
|
-
|
16
11
|
@db = Preconditions.assert_class(db, Db)
|
17
12
|
@scripts = Scripts.new(@db, Scripts::SCRIPTS)
|
18
13
|
end
|
@@ -21,32 +16,14 @@ module SchemaEvolutionManager
|
|
21
16
|
@dry_run
|
22
17
|
end
|
23
18
|
|
24
|
-
def non_interactive?
|
25
|
-
@non_interactive
|
26
|
-
end
|
27
|
-
|
28
19
|
# Applies scripts in order, returning number of scripts applied
|
29
20
|
def apply!(dir)
|
30
21
|
Preconditions.check_state(File.directory?(dir),
|
31
22
|
"Dir[%s] does not exist" % dir)
|
32
23
|
|
33
|
-
|
24
|
+
count = 0
|
34
25
|
@scripts.each_pending(dir) do |filename, path|
|
35
|
-
|
36
|
-
end
|
37
|
-
|
38
|
-
if pending_scripts.size > 1 && !dry_run? && !non_interactive?
|
39
|
-
puts "Please confirm that you would like to apply all (#{pending_scripts.size}) of the pending scripts:"
|
40
|
-
pending_scripts.each do |filename, path|
|
41
|
-
puts " #{filename}"
|
42
|
-
end
|
43
|
-
continue = SchemaEvolutionManager::Ask.for_boolean("Continue?")
|
44
|
-
if !continue
|
45
|
-
return 0
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
pending_scripts.each do |filename, path|
|
26
|
+
count += 1
|
50
27
|
if @dry_run
|
51
28
|
puts "[DRY RUN] Applying #{filename}"
|
52
29
|
puts path
|
@@ -58,8 +35,9 @@ module SchemaEvolutionManager
|
|
58
35
|
puts " Done"
|
59
36
|
end
|
60
37
|
end
|
61
|
-
|
38
|
+
count
|
62
39
|
end
|
63
40
|
|
64
41
|
end
|
42
|
+
|
65
43
|
end
|
@@ -67,7 +67,7 @@ module SchemaEvolutionManager
|
|
67
67
|
@set = found_arguments.delete(:set) || []
|
68
68
|
|
69
69
|
@dry_run = found_arguments.delete(:dry_run)
|
70
|
-
@
|
70
|
+
@non_interactice = found_arguments.delete(:non_interactive)
|
71
71
|
@password = found_arguments.delete(:password)
|
72
72
|
@help = found_arguments.delete(:help)
|
73
73
|
@verbose = found_arguments.delete(:verbose)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema-evolution-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.54
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bryzek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: '["Michael Bryzek"]'
|
14
14
|
email: mbryzek@alum.mit.edu
|