Run database migrations when necessary
Check the output of the `storage status` command for appearance of "Not Applied" migrations, and run an upgrade if so. This works around an earlier assumption that the command would exit nonzero when there are pending migrations, but it seems to exit zero even under those conditions. Change-Id: I5ff8026bfaaf31c8abcd55efc217256605be9e73
This commit is contained in:
parent
b63aa4a17b
commit
06bfcaa60e
|
@ -169,7 +169,7 @@ class phabricator::install (
|
||||||
|
|
||||||
exec { 'load-initial-db':
|
exec { 'load-initial-db':
|
||||||
command => "${phabricator_dir}/phabricator/bin/storage upgrade --force",
|
command => "${phabricator_dir}/phabricator/bin/storage upgrade --force",
|
||||||
unless => "${phabricator_dir}/phabricator/bin/storage status",
|
onlyif => "${phabricator_dir}/phabricator/bin/storage status | grep -q 'Not Applied'",
|
||||||
require => [
|
require => [
|
||||||
Vcsrepo["${phabricator_dir}/phabricator"],
|
Vcsrepo["${phabricator_dir}/phabricator"],
|
||||||
Vcsrepo["${phabricator_dir}/libphutil"],
|
Vcsrepo["${phabricator_dir}/libphutil"],
|
||||||
|
|
Loading…
Reference in New Issue