capifony 2.0.8 → 2.0.9
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.
- data/CHANGELOG +4 -0
- data/lib/symfony2.rb +9 -13
- metadata +4 -4
data/CHANGELOG
CHANGED
data/lib/symfony2.rb
CHANGED
@@ -82,7 +82,7 @@ namespace :deploy do
|
|
82
82
|
desc "Migrate Symfony2 Doctrine ORM database."
|
83
83
|
task :migrate do
|
84
84
|
currentVersion = nil
|
85
|
-
run "#{
|
85
|
+
run "cd #{latest_release} && #{php_bin} #{symfony_console} doctrine:migrations:status --env=#{symfony_env_prod}" do |ch, stream, out|
|
86
86
|
if stream == :out and out =~ /Current Version:[^$]+\(([0-9]+)\)/
|
87
87
|
currentVersion = Regexp.last_match(1)
|
88
88
|
end
|
@@ -90,24 +90,20 @@ namespace :deploy do
|
|
90
90
|
currentVersion = 0
|
91
91
|
end
|
92
92
|
end
|
93
|
-
|
93
|
+
|
94
94
|
if currentVersion == nil
|
95
95
|
raise "Could not find current database migration version"
|
96
96
|
end
|
97
|
-
puts "Current database version #{currentVersion}"
|
98
|
-
|
97
|
+
puts "Current database version: #{currentVersion}"
|
98
|
+
|
99
99
|
on_rollback {
|
100
|
-
|
101
|
-
|
102
|
-
ch.send_data("y\r\n")
|
103
|
-
end
|
100
|
+
if Capistrano::CLI.ui.agree("Do you really want to migrate #{symfony_env_prod}'s database back to version #{currentVersion}? (y/N)")
|
101
|
+
run "cd #{latest_release} && #{php_bin} #{symfony_console} doctrine:migrations:migrate #{currentVersion} --env=#{symfony_env_prod} --no-interaction"
|
104
102
|
end
|
105
103
|
}
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
ch.send_data("y\r\n")
|
110
|
-
end
|
104
|
+
|
105
|
+
if Capistrano::CLI.ui.agree("Do you really want to migrate #{symfony_env_prod}'s database? (y/N)")
|
106
|
+
run "cd #{latest_release} && #{php_bin} #{symfony_console} doctrine:migrations:migrate --env=#{symfony_env_prod} --no-interaction"
|
111
107
|
end
|
112
108
|
end
|
113
109
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capifony
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 9
|
10
|
+
version: 2.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Konstantin Kudryashov
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-15 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|