Changeset View
Changeset View
Standalone View
Standalone View
scripts/sql/manage_storage.php
#!/usr/bin/env php | #!/usr/bin/env php | ||||
<?php | <?php | ||||
$root = dirname(dirname(dirname(__FILE__))); | $root = dirname(dirname(dirname(__FILE__))); | ||||
require_once $root.'/scripts/init/init-setup.php'; | require_once $root.'/scripts/init/init-setup.php'; | ||||
$args = new PhutilArgumentParser($argv); | $args = new PhutilArgumentParser($argv); | ||||
$args->setTagline(pht('manage Phabricator storage and schemata')); | $args->setTagline(pht('manage %s storage and schemata', | ||||
PhabricatorPlatformSite::getName())); | |||||
$args->setSynopsis(<<<EOHELP | $args->setSynopsis(<<<EOHELP | ||||
**storage** __workflow__ [__options__] | **storage** __workflow__ [__options__] | ||||
Manage Phabricator database storage and schema versioning. | Manage Phabricator database storage and schema versioning. | ||||
**storage** upgrade | **storage** upgrade | ||||
Initialize or upgrade Phabricator storage. | Initialize or upgrade Phabricator storage. | ||||
**storage** upgrade --user __root__ --password __hunter2__ | **storage** upgrade --user __root__ --password __hunter2__ | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | array( | ||||
'name' => 'dryrun', | 'name' => 'dryrun', | ||||
'help' => pht( | 'help' => pht( | ||||
'Do not actually change anything, just show what would be changed.'), | 'Do not actually change anything, just show what would be changed.'), | ||||
), | ), | ||||
array( | array( | ||||
'name' => 'disable-utf8mb4', | 'name' => 'disable-utf8mb4', | ||||
'help' => pht( | 'help' => pht( | ||||
'Disable %s, even if the database supports it. This is an '. | 'Disable %s, even if the database supports it. This is an '. | ||||
'advanced feature used for testing changes to Phabricator; you '. | 'advanced feature used for testing changes to %s; you '. | ||||
'should not normally use this flag.', | 'should not normally use this flag.', | ||||
'utf8mb4'), | 'utf8mb4', | ||||
PhabricatorPlatformSite::getName()), | |||||
), | ), | ||||
)); | )); | ||||
} catch (PhutilArgumentUsageException $ex) { | } catch (PhutilArgumentUsageException $ex) { | ||||
$args->printUsageException($ex); | $args->printUsageException($ex); | ||||
exit(77); | exit(77); | ||||
} | } | ||||
// First, test that the Phabricator configuration is set up correctly. After | // First, test that the Phabricator configuration is set up correctly. After | ||||
▲ Show 20 Lines • Show All 162 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0