Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15284257
D16509.id39728.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D16509.id39728.diff
View Options
diff --git a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
--- a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
+++ b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
@@ -8,6 +8,8 @@
private $force;
private $patches;
+ private $didInitialize;
+
final public function getAPI() {
return $this->api;
}
@@ -176,12 +178,16 @@
"%s\n",
pht('DRYRUN: Would apply adjustments.'));
return 0;
+ } else if ($this->didInitialize) {
+ // If we just initialized the database, continue without prompting. This
+ // is nicer for first-time setup and there's no reasonable reason any
+ // user would ever answer "no" to the prompt against an empty schema.
} else if (!$this->force) {
$console->writeOut(
"\n%s\n",
pht(
- "Found %s issues(s) with schemata, detailed above.\n\n".
- "You can review issues in more detail from the web interface, ".
+ "Found %s adjustment(s) to apply, detailed above.\n\n".
+ "You can review adjustments in more detail from the web interface, ".
"in Config > Database Status. To better understand the adjustment ".
"workflow, see \"Managing Storage Adjustments\" in the ".
"documentation.\n\n".
@@ -189,7 +195,7 @@
"migrations may take some time.",
phutil_count($adjustments)));
- $prompt = pht('Fix these schema issues?');
+ $prompt = pht('Apply these schema adjustments?');
if (!phutil_console_confirm($prompt, $default_no = true)) {
return 1;
}
@@ -197,7 +203,7 @@
$console->writeOut(
"%s\n",
- pht('Fixing schema issues...'));
+ pht('Applying schema adjustments...'));
$conn = $api->getConn(null);
@@ -368,7 +374,7 @@
if (!$failed) {
$console->writeOut(
"%s\n",
- pht('Completed fixing all schema issues.'));
+ pht('Completed applying all schema adjustments.'));
$err = 0;
} else {
@@ -800,6 +806,11 @@
return 1;
}
+ // If we're initializing storage for the first time, track it so that
+ // we can give the user a nicer experience during the subsequent
+ // adjustment phase.
+ $this->didInitialize = true;
+
$legacy = $api->getLegacyPatches($this->patches);
if ($legacy || $no_quickstart || $init_only) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 5, 9:29 AM (6 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7224650
Default Alt Text
D16509.id39728.diff (2 KB)
Attached To
Mode
D16509: Make storage adjustment a little nicer, especially the first time
Attached
Detach File
Event Timeline
Log In to Comment