repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/celerity/packages.php | resources/celerity/packages.php | <?php
return array(
'core.pkg.js' => array(
'javelin-util',
'javelin-install',
'javelin-event',
'javelin-stratcom',
'javelin-behavior',
'javelin-resource',
'javelin-request',
'javelin-vector',
'javelin-dom',
'javelin-json',
'javelin-uri',
'javelin-workflow',
'javel... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/celerity/map.php | resources/celerity/map.php | <?php
/**
* This file is automatically generated. Use 'bin/celerity map' to rebuild it.
*
* @generated
*/
return array(
'names' => array(
'conpherence.pkg.css' => 'b2d6f4b8',
'conpherence.pkg.js' => '020aebcf',
'core.pkg.css' => 'eeb65c02',
'core.pkg.js' => '9250c090',
'dark-console.pkg.js' =... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | true |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20210316.almanac.09.namespace-mailkey.php | resources/sql/autopatches/20210316.almanac.09.namespace-mailkey.php | <?php
$namespace_table = new AlmanacNamespace();
$namespace_conn = $namespace_table->establishConnection('w');
$properties_table = new PhabricatorMetaMTAMailProperties();
$conn = $properties_table->establishConnection('w');
$iterator = new LiskRawMigrationIterator(
$namespace_conn,
$namespace_table->getTableName... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140722.appname.php | resources/sql/autopatches/20140722.appname.php | <?php
$applications = array(
'Audit',
'Auth',
'Calendar',
'Conduit',
'Config',
'Conpherence',
'Countdown',
'Daemons',
'Dashboard',
'Differential',
'Diffusion',
'Diviner',
'Doorkeeper',
'Drydock',
'Fact',
'Feed',
'Files',
'Flags',
'Harbormaster',
'Help',
'Herald',
'Home',
'... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140113.legalpadsig.2.php | resources/sql/autopatches/20140113.legalpadsig.2.php | <?php
echo pht('Adding secretkeys to legalpad document signatures.')."\n";
$table = new LegalpadDocumentSignature();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $sig) {
$id = $sig->getID();
echo pht('Populating signature %d...', $id)."\n";
i... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20210316.almanac.15.intiative-mailkey.php | resources/sql/autopatches/20210316.almanac.15.intiative-mailkey.php | <?php
$initiative_table = new FundInitiative();
$initiative_conn = $initiative_table->establishConnection('w');
$properties_table = new PhabricatorMetaMTAMailProperties();
$conn = $properties_table->establishConnection('w');
$iterator = new LiskRawMigrationIterator(
$initiative_conn,
$initiative_table->getTableN... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20141107.phriction.popkeys.php | resources/sql/autopatches/20141107.phriction.popkeys.php | <?php
$table = new PhrictionDocument();
$conn_w = $table->establishConnection('w');
echo pht('Populating Phriction mailkeys.')."\n";
foreach (new LiskMigrationIterator($table) as $doc) {
$id = $doc->getID();
$key = $doc->getMailKey();
if ((strlen($key) == 20) && (strpos($key, "\0") === false)) {
// To be ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180828.phriction.04.migrate.php | resources/sql/autopatches/20180828.phriction.04.migrate.php | <?php
// Update the PhrictionDocument and PhrictionContent tables to refer to one
// another by PHID instead of by ID.
$document_table = new PhrictionDocument();
$content_table = new PhrictionContent();
$conn = $document_table->establishConnection('w');
$document_iterator = new LiskRawMigrationIterator(
$conn,
... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180403.draft.01.broadcast.php | resources/sql/autopatches/20180403.draft.01.broadcast.php | <?php
$table = new DifferentialRevision();
$conn = $table->establishConnection('w');
$drafts = $table->loadAllWhere(
'status = %s',
DifferentialRevisionStatus::DRAFT);
foreach ($drafts as $draft) {
$properties = $draft->getProperties();
$properties[DifferentialRevision::PROPERTY_SHOULD_BROADCAST] = false;
... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20190815.account.02.subscriptions.php | resources/sql/autopatches/20190815.account.02.subscriptions.php | <?php
$edge_type = PhortuneAccountHasMerchantEdgeType::EDGECONST;
$table = new PhortuneSubscription();
foreach (new LiskMigrationIterator($table) as $sub) {
id(new PhabricatorEdgeEditor())
->addEdge($sub->getAccountPHID(), $edge_type, $sub->getMerchantPHID())
->save();
}
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20150504.symbolsproject.1.php | resources/sql/autopatches/20150504.symbolsproject.1.php | <?php
// NOTE: This migration moved existing symbol configuration from Arcanist
// Projects to Repositories. Like "20150503.repositorysymbols.2.php", it stopped
// running cleanly about two months later, after Spaces were introduced. Since
// this data is easy to rebuild, just stop running the migration. See T8691 and... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20210316.almanac.01.device-mailkey.php | resources/sql/autopatches/20210316.almanac.01.device-mailkey.php | <?php
$device_table = new AlmanacDevice();
$device_conn = $device_table->establishConnection('w');
$properties_table = new PhabricatorMetaMTAMailProperties();
$conn = $properties_table->establishConnection('w');
$iterator = new LiskRawMigrationIterator(
$device_conn,
$device_table->getTableName());
foreach ($it... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20150622.metamta.5.actor-phid-mig.php | resources/sql/autopatches/20150622.metamta.5.actor-phid-mig.php | <?php
$table = new PhabricatorMetaMTAMail();
$conn_w = $table->establishConnection('w');
echo pht('Assigning actorPHIDs to mails...')."\n";
foreach (new LiskMigrationIterator($table) as $mail) {
$id = $mail->getID();
echo pht('Updating mail %d...', $id)."\n";
if ($mail->getActorPHID()) {
continue;
}
$... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160202.ipv6.2.php | resources/sql/autopatches/20160202.ipv6.2.php | <?php
$pull = new PhabricatorRepositoryPullEvent();
$push = new PhabricatorRepositoryPushEvent();
$conn_w = $pull->establishConnection('w');
$log_types = array($pull, $push);
foreach ($log_types as $log) {
foreach (new LiskMigrationIterator($log) as $row) {
$addr = $row->getRemoteAddress();
$addr = (strin... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20151219.proj.06.defaultpolicy.php | resources/sql/autopatches/20151219.proj.06.defaultpolicy.php | <?php
$app = PhabricatorApplication::getByClass('PhabricatorProjectApplication');
$view_policy = $app->getPolicy(ProjectDefaultViewCapability::CAPABILITY);
$edit_policy = $app->getPolicy(ProjectDefaultEditCapability::CAPABILITY);
$join_policy = $app->getPolicy(ProjectDefaultJoinCapability::CAPABILITY);
$table = new ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180208.maniphest.02.populate.php | resources/sql/autopatches/20180208.maniphest.02.populate.php | <?php
$table = new ManiphestTask();
$conn = $table->establishConnection('w');
$viewer = PhabricatorUser::getOmnipotentUser();
foreach (new LiskMigrationIterator($table) as $task) {
if ($task->getClosedEpoch()) {
// Task already has a closed date.
continue;
}
$status = $task->getStatus();
if (!Maniphe... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20181213.auth.02.populatephid.php | resources/sql/autopatches/20181213.auth.02.populatephid.php | <?php
$table = new PhabricatorAuthSession();
$iterator = new LiskMigrationIterator($table);
$conn = $table->establishConnection('w');
foreach ($iterator as $session) {
if (strlen($session->getPHID())) {
continue;
}
queryfx(
$conn,
'UPDATE %R SET phid = %s WHERE id = %d',
$table,
$session->g... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20170410.calendar.01.repair.php | resources/sql/autopatches/20170410.calendar.01.repair.php | <?php
// See T12488. Some events survived "20161004.cal.01.noepoch.php" without
// having "utcInstanceEpoch" computed, which breaks ICS export. This appears
// to be the result of some bug which has been fixed in the meantime, so just
// redo this part of the migration.
$table = new PhabricatorCalendarEvent();
$conn ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180306.opath.02.digestpopulate.php | resources/sql/autopatches/20180306.opath.02.digestpopulate.php | <?php
$table = new PhabricatorOwnersPath();
$conn = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $path) {
$index = PhabricatorHash::digestForIndex($path->getPath());
if ($index === $path->getPathIndex()) {
continue;
}
queryfx(
$conn,
'UPDATE %T SET pathIndex = ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160223.paste.fileedges.php | resources/sql/autopatches/20160223.paste.fileedges.php | <?php
// For a while in November 2015, attachment edges between pastes and their
// underlying file data were not written correctly. This restores edges for
// any missing pastes.
// See T13510. The "pastebin" database was later renamed to "paste", which
// broke this migration. The migration was removed in 2020 sinc... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140815.cancdncase.php | resources/sql/autopatches/20140815.cancdncase.php | <?php
// This corrects files which incorrectly had a 'cancdn' property written;
// the property should be 'canCDN'.
$table = new PhabricatorFile();
$conn_w = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $file) {
$id = $file->getID();
echo pht(
"Updating capitalization of %s ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140211.dx.2.migcommenttext.php | resources/sql/autopatches/20140211.dx.2.migcommenttext.php | <?php
$conn_w = id(new DifferentialRevision())->establishConnection('w');
$rows = new LiskRawMigrationIterator($conn_w, 'differential_comment');
$content_source = PhabricatorContentSource::newForSource(
PhabricatorOldWorldContentSource::SOURCECONST)->serialize();
echo pht('Migrating Differential comment text to mo... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20170912.ferret.01.activity.php | resources/sql/autopatches/20170912.ferret.01.activity.php | <?php
// Advise installs to perform a reindex in order to rebuild the Ferret engine
// indexes.
// If the install is completely empty with no user accounts, don't require
// a rebuild. In particular, this happens when rebuilding the quickstart file.
$users = id(new PhabricatorUser())->loadAllWhere('1 = 1 LIMIT 1');
i... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160406.columns.1.php | resources/sql/autopatches/20160406.columns.1.php | <?php
$table = new ManiphestTransaction();
$conn_w = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $xaction) {
$type = $xaction->getTransactionType();
$id = $xaction->getID();
// This is an old ManiphestTransaction::TYPE_COLUMN. It did not do anything
// on its own and was h... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20190909.herald.01.rebuild.php | resources/sql/autopatches/20190909.herald.01.rebuild.php | <?php
// @phase worker
PhabricatorRebuildIndexesWorker::rebuildObjectsWithQuery('HeraldRuleQuery');
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20151107.phame.blog.mailkey.2.php | resources/sql/autopatches/20151107.phame.blog.mailkey.2.php | <?php
$table = new PhameBlog();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $blog) {
$id = $blog->getID();
echo pht('Adding mail key for Blog %d...', $id);
echo "\n";
queryfx(
$conn_w,
'UPDATE %T SET mailKey = %s WHERE id = %d',
... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20191028.uriindex.01.rebuild.php | resources/sql/autopatches/20191028.uriindex.01.rebuild.php | <?php
// @phase worker
PhabricatorRebuildIndexesWorker::rebuildObjectsWithQuery(
'PhabricatorRepositoryQuery');
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140731.cancdn.php | resources/sql/autopatches/20140731.cancdn.php | <?php
$table = new PhabricatorFile();
$conn_w = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $file) {
$id = $file->getID();
echo pht('Updating flags for file %d...', $id)."\n";
$meta = $file->getMetadata();
if (!idx($meta, 'canCDN')) {
$meta['canCDN'] = true;
queryf... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160531.pref.07.phidval.php | resources/sql/autopatches/20160531.pref.07.phidval.php | <?php
$table = new PhabricatorUserPreferences();
$conn_w = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $row) {
if ($row->getPHID() !== '') {
continue;
}
queryfx(
$conn_w,
'UPDATE %T SET phid = %s WHERE id = %d',
$table->getTableName(),
$table->generatePHI... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160927.phurl.ngrams.php | resources/sql/autopatches/20160927.phurl.ngrams.php | <?php
// This was an old reindexing migration that has been obsoleted. See T13253.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140725.audit.1.migxactions.php | resources/sql/autopatches/20140725.audit.1.migxactions.php | <?php
$conn_w = id(new PhabricatorAuditTransaction())->establishConnection('w');
$rows = new LiskRawMigrationIterator($conn_w, 'audit_comment');
$content_source = PhabricatorContentSource::newForSource(
PhabricatorOldWorldContentSource::SOURCECONST)->serialize();
echo pht('Migrating Audit comments to modern storag... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20150120.maniphestdefaultauthor.php | resources/sql/autopatches/20150120.maniphestdefaultauthor.php | <?php
$key = 'metamta.maniphest.default-public-author';
echo pht("Migrating `%s` to new application email infrastructure...\n", $key);
$value = PhabricatorEnv::getEnvConfigIfExists($key);
$maniphest = new PhabricatorManiphestApplication();
$config_key =
PhabricatorMetaMTAApplicationEmail::CONFIG_DEFAULT_AUTHOR;
if ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160303.drydock.2.bluei.php | resources/sql/autopatches/20160303.drydock.2.bluei.php | <?php
// This was an old reindexing migration that has been obsoleted. See T13253.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140321.mstatus.2.mig.php | resources/sql/autopatches/20140321.mstatus.2.mig.php | <?php
$status_map = array(
0 => 'open',
1 => 'resolved',
2 => 'wontfix',
3 => 'invalid',
4 => 'duplicate',
5 => 'spite',
);
$conn_w = id(new ManiphestTask())->establishConnection('w');
echo pht('Migrating tasks to new status constants...')."\n";
foreach (new LiskMigrationIterator(new ManiphestTask()) as ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20191113.identity.02.populate.php | resources/sql/autopatches/20191113.identity.02.populate.php | <?php
$table = new PhabricatorRepositoryIdentity();
$conn = $table->establishConnection('w');
$iterator = new LiskRawMigrationIterator($conn, $table->getTableName());
foreach ($iterator as $row) {
$name = $row['identityNameRaw'];
$name = phutil_utf8ize($name);
$email = new PhutilEmailAddress($name);
$address... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160510.repo.01.uriindex.php | resources/sql/autopatches/20160510.repo.01.uriindex.php | <?php
$repos = id(new PhabricatorRepositoryQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->needURIs(true)
->execute();
foreach ($repos as $repo) {
$repo->updateURIIndex();
}
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20151023.harborpolicy.2.php | resources/sql/autopatches/20151023.harborpolicy.2.php | <?php
$table = new HarbormasterBuildPlan();
$conn_w = $table->establishConnection('w');
$view_policy = PhabricatorPolicies::getMostOpenPolicy();
queryfx(
$conn_w,
'UPDATE %T SET viewPolicy = %s WHERE viewPolicy = %s',
$table->getTableName(),
$view_policy,
'');
$edit_policy = id(new PhabricatorHarbormasterA... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140226.dxcustom.1.fielddata.php | resources/sql/autopatches/20140226.dxcustom.1.fielddata.php | <?php
$conn_w = id(new DifferentialRevision())->establishConnection('w');
$rows = new LiskRawMigrationIterator($conn_w, 'differential_auxiliaryfield');
echo pht('Modernizing Differential auxiliary field storage...')."\n";
$table_name = id(new DifferentialCustomFieldStorage())->getTableName();
foreach ($rows as $row)... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140722.audit.3.miginlines.php | resources/sql/autopatches/20140722.audit.3.miginlines.php | <?php
$audit_table = new PhabricatorAuditTransaction();
$conn_w = $audit_table->establishConnection('w');
$conn_w->openTransaction();
$src_table = 'audit_inlinecomment';
$dst_table = 'audit_transaction_comment';
echo pht('Migrating Audit inline comments to new format...')."\n";
$content_source = PhabricatorContentS... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20151106.phame.post.mailkey.2.php | resources/sql/autopatches/20151106.phame.post.mailkey.2.php | <?php
$table = new PhamePost();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $post) {
$id = $post->getID();
echo pht('Adding mail key for Post %d...', $id);
echo "\n";
queryfx(
$conn_w,
'UPDATE %T SET mailKey = %s WHERE id = %d',
... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20141222.maniphestprojtxn.php | resources/sql/autopatches/20141222.maniphestprojtxn.php | <?php
$table = new ManiphestTransaction();
$conn_w = $table->establishConnection('w');
echo pht(
"Converting Maniphest project transactions to modern edge transactions...\n");
$metadata = array(
'edge:type' => PhabricatorProjectObjectHasProjectEdgeType::EDGECONST,
);
foreach (new LiskMigrationIterator($table) as ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20150804.ponder.answer.mailkey.2.php | resources/sql/autopatches/20150804.ponder.answer.mailkey.2.php | <?php
$table = new PonderAnswer();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $answer) {
$id = $answer->getID();
echo pht('Adding mail key for Answer %d...', $id);
echo "\n";
queryfx(
$conn_w,
'UPDATE %T SET mailKey = %s WHERE id =... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160503.repo.03.lpathmigrate.php | resources/sql/autopatches/20160503.repo.03.lpathmigrate.php | <?php
$table = new PhabricatorRepository();
$conn_w = $table->establishConnection('w');
$default_path = PhabricatorEnv::getEnvConfig('repository.default-local-path');
$default_path = rtrim($default_path, '/');
foreach (new LiskMigrationIterator($table) as $repository) {
$local_path = $repository->getLocalPath();
... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180121.auth.04.accountphid.php | resources/sql/autopatches/20180121.auth.04.accountphid.php | <?php
// Populate account passwords (which we copied from the user table in the last
// migration) with new PHIDs.
$table = new PhabricatorAuthPassword();
$conn = $table->establishConnection('w');
$password_type = PhabricatorAuthPasswordPHIDType::TYPECONST;
foreach (new LiskMigrationIterator($table) as $row) {
if... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140904.macroattach.php | resources/sql/autopatches/20140904.macroattach.php | <?php
$table = new PhabricatorFileImageMacro();
foreach (new LiskMigrationIterator($table) as $macro) {
$name = $macro->getName();
echo pht("Linking macro '%s'...", $name)."\n";
$editor = new PhabricatorEdgeEditor();
$phids[] = $macro->getFilePHID();
$phids[] = $macro->getAudioPHID();
$phids = array_fil... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20141107.ssh.4.keymig.php | resources/sql/autopatches/20141107.ssh.4.keymig.php | <?php
$table = new PhabricatorAuthSSHKey();
$conn_w = $table->establishConnection('w');
echo pht('Updating SSH public key indexes...')."\n";
$keys = new LiskMigrationIterator($table);
foreach ($keys as $key) {
$id = $key->getID();
echo pht('Updating key %d...', $id)."\n";
try {
$hash = $key->toPublicKey(... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140205.cal.3.phid-mig.php | resources/sql/autopatches/20140205.cal.3.phid-mig.php | <?php
$table = new PhabricatorCalendarEvent();
$conn_w = $table->establishConnection('w');
echo pht('Assigning PHIDs to events...')."\n";
foreach (new LiskMigrationIterator($table) as $event) {
$id = $event->getID();
echo pht('Updating event %d...', $id)."\n";
if ($event->getPHID()) {
continue;
}
quer... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180214.harbor.01.aborted.php | resources/sql/autopatches/20180214.harbor.01.aborted.php | <?php
$table = new HarbormasterBuildable();
$conn = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $buildable) {
if ($buildable->getBuildableStatus() !== 'building') {
continue;
}
$aborted = queryfx_one(
$conn,
'SELECT * FROM %T WHERE buildablePHID = %s AND buildSta... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20150725.countdown.mailkey.2.php | resources/sql/autopatches/20150725.countdown.mailkey.2.php | <?php
$table = new PhabricatorCountdown();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $countdown) {
$id = $countdown->getID();
echo pht('Adding mail key for countdown %d...', $id);
echo "\n";
queryfx(
$conn_w,
'UPDATE %T SET mailKe... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140711.pnames.2.php | resources/sql/autopatches/20140711.pnames.2.php | <?php
echo pht('Updating project datasource tokens...')."\n";
foreach (new LiskMigrationIterator(new PhabricatorProject()) as $project) {
$name = $project->getName();
echo pht("Updating project '%d'...", $name)."\n";
$project->updateDatasourceTokens();
}
echo pht('Done.')."\n";
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180215.phriction.02.phidvalues.php | resources/sql/autopatches/20180215.phriction.02.phidvalues.php | <?php
$table = new PhrictionContent();
$conn = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $row) {
if (strlen($row->getPHID())) {
continue;
}
queryfx(
$conn,
'UPDATE %T SET phid = %s WHERE id = %d',
$table->getTableName(),
$table->generatePHID(),
$row... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160503.repo.04.mirrormigrate.php | resources/sql/autopatches/20160503.repo.04.mirrormigrate.php | <?php
$table = new PhabricatorRepository();
$conn_w = $table->establishConnection('w');
$mirrors = queryfx_all(
$conn_w,
'SELECT * FROM %T',
'repository_mirror');
foreach ($mirrors as $mirror) {
$repository_phid = $mirror['repositoryPHID'];
$uri = $mirror['remoteURI'];
$already_exists = id(new Phabricat... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180828.phriction.06.c.documentid.php | resources/sql/autopatches/20180828.phriction.06.c.documentid.php | <?php
// See T13193. We're about to drop the "documentID" column, which is part of
// a UNIQUE KEY. In MariaDB, we must first drop the "documentID" key or we get
// into deep trouble.
// There's no "IF EXISTS" modifier for "ALTER TABLE" so run this as a PHP patch
// instead of an SQL patch.
$table = new PhrictionCon... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180830.phriction.02.maxes.php | resources/sql/autopatches/20180830.phriction.02.maxes.php | <?php
// Populate the "maxVersion" column by copying the maximum "version" from the
// content table.
$document_table = new PhrictionDocument();
$content_table = new PhrictionContent();
$conn = $document_table->establishConnection('w');
$iterator = new LiskRawMigrationIterator(
$conn,
$document_table->getTableN... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140706.harbormasterdepend.1.php | resources/sql/autopatches/20140706.harbormasterdepend.1.php | <?php
$plan_table = new HarbormasterBuildPlan();
$step_table = new HarbormasterBuildStep();
$conn_w = $plan_table->establishConnection('w');
foreach (new LiskMigrationIterator($plan_table) as $plan) {
echo pht(
"Migrating build plan %d: %s...\n",
$plan->getID(),
$plan->getName());
// Load all build s... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140722.renameauth.php | resources/sql/autopatches/20140722.renameauth.php | <?php
$map = array(
'PhabricatorAuthProviderOAuthAmazon' => 'PhabricatorAmazonAuthProvider',
'PhabricatorAuthProviderOAuthAsana' => 'PhabricatorAsanaAuthProvider',
'PhabricatorAuthProviderOAuth1Bitbucket'
=> 'PhabricatorBitbucketAuthProvider',
'PhabricatorAuthProviderOAuthDisqus' => 'PhabricatorDisqusAuthP... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160225.almanac.3.stype.php | resources/sql/autopatches/20160225.almanac.3.stype.php | <?php
// Previously, Almanac services stored a "serviceClass". Migrate these to
// new "serviceType" values.
$table = new AlmanacService();
$conn_w = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $service) {
$new_type = null;
try {
$old_type = $service->getServiceType();
... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20181220.pholio.01.mailkey.php | resources/sql/autopatches/20181220.pholio.01.mailkey.php | <?php
$mock_table = new PholioMock();
$mock_conn = $mock_table->establishConnection('w');
$properties_table = new PhabricatorMetaMTAMailProperties();
$conn = $properties_table->establishConnection('w');
$iterator = new LiskRawMigrationIterator(
$mock_conn,
$mock_table->getTableName());
foreach ($iterator as $ro... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140210.herald.rule-condition-mig.php | resources/sql/autopatches/20140210.herald.rule-condition-mig.php | <?php
$table = new HeraldCondition();
$conn_w = $table->establishConnection('w');
echo pht(
"Migrating Herald conditions of type Herald rule from IDs to PHIDs...\n");
foreach (new LiskMigrationIterator($table) as $condition) {
if ($condition->getFieldName() != HeraldAnotherRuleField::FIELDCONST) {
continue;
... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140521.projectslug.2.mig.php | resources/sql/autopatches/20140521.projectslug.2.mig.php | <?php
$project_table = new PhabricatorProject();
$table_name = $project_table->getTableName();
$conn_w = $project_table->establishConnection('w');
$slug_table_name = id(new PhabricatorProjectSlug())->getTableName();
$time = PhabricatorTime::getNow();
echo pht('Migrating projects to slugs...')."\n";
foreach (new LiskM... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140420.rel.2.objectmig.php | resources/sql/autopatches/20140420.rel.2.objectmig.php | <?php
$pull_table = new ReleephRequest();
$table_name = $pull_table->getTableName();
$conn_w = $pull_table->establishConnection('w');
echo pht('Setting object PHIDs for requests...')."\n";
foreach (new LiskMigrationIterator($pull_table) as $pull) {
$id = $pull->getID();
echo pht('Migrating pull request %d...', $... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140218.passwords.4.vcs.php | resources/sql/autopatches/20140218.passwords.4.vcs.php | <?php
// This migration once upgraded VCS password hashing, but the table was
// later removed in 2018 (see T13043).
// Since almost four years have passed since this migration, the cost of
// losing this data is very small (users just need to reset their passwords),
// and a version of this migration against the mod... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160227.harbormaster.2.plani.php | resources/sql/autopatches/20160227.harbormaster.2.plani.php | <?php
// This was an old reindexing migration that has been obsoleted. See T13253.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20190412.dashboard.01.panels.php | resources/sql/autopatches/20190412.dashboard.01.panels.php | <?php
// Convert dashboards to a new storage format. The old storage format looks
// like this:
// {
// "0": ["PHID-DSHP-A", ...],
// "1": ["PHID-DSHP-B", ...]
// }
// The new storage format looks like this:
// [
// {
// "panelKey": "abcdefgh",
// "panelPHID": "PHID-DSHP-A",
// "columnKey": "left"... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20150116.maniphestapplicationemails.php | resources/sql/autopatches/20150116.maniphestapplicationemails.php | <?php
$key = 'metamta.maniphest.public-create-email';
echo pht("Migrating `%s` to new application email infrastructure...\n", $key);
$value = PhabricatorEnv::getEnvConfigIfExists($key);
$maniphest = new PhabricatorManiphestApplication();
if ($value) {
try {
PhabricatorMetaMTAApplicationEmail::initializeNewAppEm... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20150602.mlist.2.php | resources/sql/autopatches/20150602.mlist.2.php | <?php
$conn_w = id(new PhabricatorMetaMTAMail())->establishConnection('w');
$lists = new LiskRawMigrationIterator($conn_w, 'metamta_mailinglist');
echo pht('Migrating mailing lists...')."\n";
foreach ($lists as $list) {
$name = $list['name'];
$email = $list['email'];
$uri = $list['uri'];
$old_phid = $list['p... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20210316.almanac.13.event-mailkey.php | resources/sql/autopatches/20210316.almanac.13.event-mailkey.php | <?php
$event_table = new PhabricatorCalendarEvent();
$event_conn = $event_table->establishConnection('w');
$properties_table = new PhabricatorMetaMTAMailProperties();
$conn = $properties_table->establishConnection('w');
$iterator = new LiskRawMigrationIterator(
$event_conn,
$event_table->getTableName());
foreac... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160308.nuance.04.sourcei.php | resources/sql/autopatches/20160308.nuance.04.sourcei.php | <?php
// This was an old reindexing migration that has been obsoleted. See T13253.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20220525.slowvote.01.mailkey.php | resources/sql/autopatches/20220525.slowvote.01.mailkey.php | <?php
$poll_table = new PhabricatorSlowvotePoll();
$poll_conn = $poll_table->establishConnection('w');
$properties_table = new PhabricatorMetaMTAMailProperties();
$conn = $properties_table->establishConnection('w');
$iterator = new LiskRawMigrationIterator(
$poll_conn,
$poll_table->getTableName());
foreach ($it... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20141106.uniqdrafts.php | resources/sql/autopatches/20141106.uniqdrafts.php | <?php
// This table has been removed; see T12104 for details.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20200222.xident.02.dropkey.php | resources/sql/autopatches/20200222.xident.02.dropkey.php | <?php
// See T13493. This table previously had a UNIQUE KEY on "<accountType,
// accountDomain, accountID>", which is obsolete. The application now violates
// this key, so make sure it gets dropped.
// There's no "IF EXISTS" modifier for "ALTER TABLE" so run this as a PHP patch
// instead of an SQL patch.
$table = ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20141218.maniphestcctxn.php | resources/sql/autopatches/20141218.maniphestcctxn.php | <?php
$table = new ManiphestTransaction();
$conn_w = $table->establishConnection('w');
echo pht(
"Converting Maniphest CC transactions to modern ".
"subscriber transactions...\n");
foreach (new LiskMigrationIterator($table) as $txn) {
// ManiphestTransaction::TYPE_CCS
if ($txn->getTransactionType() == 'ccs') ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180910.audit.03.status.php | resources/sql/autopatches/20180910.audit.03.status.php | <?php
$table = new PhabricatorRepositoryCommit();
$conn = $table->establishConnection('w');
$status_map = array(
0 => 'none',
1 => 'needs-audit',
2 => 'concern-raised',
3 => 'partially-audited',
4 => 'audited',
5 => 'needs-verification',
);
foreach ($status_map as $old_status => $new_status) {
queryfx(... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20190815.account.01.carts.php | resources/sql/autopatches/20190815.account.01.carts.php | <?php
$edge_type = PhortuneAccountHasMerchantEdgeType::EDGECONST;
$table = new PhortuneCart();
foreach (new LiskMigrationIterator($table) as $cart) {
id(new PhabricatorEdgeEditor())
->addEdge($cart->getAccountPHID(), $edge_type, $cart->getMerchantPHID())
->save();
}
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20181031.board.01.queryreset.php | resources/sql/autopatches/20181031.board.01.queryreset.php | <?php
// See T13208. It was previously possible to replace a saved query with another
// saved query, causing loss of the first query. Find projects which have their
// default query set to an invalid query and throw the setting away.
$viewer = PhabricatorUser::getOmnipotentUser();
$table = new PhabricatorProject();... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20161011.conpherence.ngrams.php | resources/sql/autopatches/20161011.conpherence.ngrams.php | <?php
// This was an old reindexing migration that has been obsoleted. See T13253.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20161213.diff.01.hunks.php | resources/sql/autopatches/20161213.diff.01.hunks.php | <?php
$conn = id(new DifferentialRevision())->establishConnection('w');
$src_table = 'differential_hunk';
$dst_table = 'differential_hunk_modern';
echo tsprintf(
"%s\n",
pht('Migrating old hunks...'));
foreach (new LiskRawMigrationIterator($conn, $src_table) as $row) {
queryfx(
$conn,
'INSERT INTO %T
... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20200222.xident.01.migrate.php | resources/sql/autopatches/20200222.xident.01.migrate.php | <?php
$account_table = new PhabricatorExternalAccount();
$identifier_table = new PhabricatorExternalAccountIdentifier();
$conn = $account_table->establishConnection('w');
$table_name = $account_table->getTableName();
$iterator = new LiskRawMigrationIterator($conn, $table_name);
foreach ($iterator as $account_row) {
... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20170526.milestones.php | resources/sql/autopatches/20170526.milestones.php | <?php
// This was an old reindexing migration that has been obsoleted. See T13253.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20170316.rawfiles.01.php | resources/sql/autopatches/20170316.rawfiles.01.php | <?php
// Previously, files generated by "View Raw File" were written as permanent
// files with excessively wide view permissions. This destroys these files
// so they are recreated as temporary files with correct permissions when
// next accessed.
$table = new DifferentialChangeset();
$conn = $table->establishConnec... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20151231.proj.01.icon.php | resources/sql/autopatches/20151231.proj.01.icon.php | <?php
$icon_map = array(
'fa-briefcase' => 'project',
'fa-tags' => 'tag',
'fa-lock' => 'policy',
'fa-users' => 'group',
'fa-folder' => 'folder',
'fa-calendar' => 'timeline',
'fa-flag-checkered' => 'goal',
'fa-truck' => 'release',
'fa-bug' => 'bugs',
'fa-trash-o' => 'cleanup',
'fa-umbrella' => '... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20190115.mfa.02.migrate.php | resources/sql/autopatches/20190115.mfa.02.migrate.php | <?php
// Previously, MFA factors for individual users were bound to raw factor types.
// The only factor type ever implemented in the upstream was "totp".
// Going forward, individual factors are bound to a provider instead. This
// allows factor types to have some configuration, like API keys for
// service-based MF... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20151210.land.2.refphid.php | resources/sql/autopatches/20151210.land.2.refphid.php | <?php
$table = new PhabricatorRepositoryRefCursor();
$conn_w = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $cursor) {
if (strlen($cursor->getPHID())) {
continue;
}
queryfx(
$conn_w,
'UPDATE %T SET phid = %s WHERE id = %d',
$table->getTableName(),
$table->... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20150606.mlist.1.php | resources/sql/autopatches/20150606.mlist.1.php | <?php
$conn_r = id(new PhabricatorMetaMTAMail())->establishConnection('r');
$rows = queryfx_all(
$conn_r,
'SELECT phid, email FROM %T',
'metamta_mailinglist');
if (!$rows) {
echo pht('No mailing lists to migrate.')."\n";
return;
}
$list_map = array();
foreach ($rows as $row) {
$list_map[phutil_utf8_strto... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20161005.cal.01.rrules.php | resources/sql/autopatches/20161005.cal.01.rrules.php | <?php
$table = new PhabricatorCalendarEvent();
$conn = $table->establishConnection('w');
$table_name = 'calendar_event';
foreach (new LiskRawMigrationIterator($conn, $table_name) as $row) {
$parameters = phutil_json_decode($row['parameters']);
if (isset($parameters['recurrenceRule'])) {
// This event has alre... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180306.opath.03.purge.php | resources/sql/autopatches/20180306.opath.03.purge.php | <?php
$table = new PhabricatorOwnersPath();
$conn = $table->establishConnection('w');
$seen = array();
foreach (new LiskMigrationIterator($table) as $path) {
$package_id = $path->getPackageID();
$repository_phid = $path->getRepositoryPHID();
$path_index = $path->getPathIndex();
if (!isset($seen[$package_id][... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20210316.almanac.07.binding-mailkey.php | resources/sql/autopatches/20210316.almanac.07.binding-mailkey.php | <?php
$binding_table = new AlmanacBinding();
$binding_conn = $binding_table->establishConnection('w');
$properties_table = new PhabricatorMetaMTAMailProperties();
$conn = $properties_table->establishConnection('w');
$iterator = new LiskRawMigrationIterator(
$binding_conn,
$binding_table->getTableName());
foreac... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140210.projcfield.1.blurb.php | resources/sql/autopatches/20140210.projcfield.1.blurb.php | <?php
$conn_w = id(new PhabricatorProject())->establishConnection('w');
$table_name = id(new PhabricatorProjectCustomFieldStorage())->getTableName();
$rows = new LiskRawMigrationIterator($conn_w, 'project_profile');
echo pht('Migrating project descriptions to custom storage...')."\n";
foreach ($rows as $row) {
$ph... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140108.ddbpname.2.php | resources/sql/autopatches/20140108.ddbpname.2.php | <?php
echo pht('Adding names to Drydock blueprints.')."\n";
$table = new DrydockBlueprint();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $blueprint) {
$id = $blueprint->getID();
echo pht('Populating blueprint %d...', $id)."\n";
if (!strlen($... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20150129.pastefileapplicationemails.php | resources/sql/autopatches/20150129.pastefileapplicationemails.php | <?php
$key_files = 'metamta.files.public-create-email';
$key_paste = 'metamta.paste.public-create-email';
echo pht(
"Migrating `%s` and `%s` to new application email infrastructure...\n",
$key_files,
$key_paste);
$value_files = PhabricatorEnv::getEnvConfigIfExists($key_files);
$files_app = new PhabricatorFilesA... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20151221.search.3.reindex.php | resources/sql/autopatches/20151221.search.3.reindex.php | <?php
// This was an old reindexing migration that has been obsoleted. See T13253.
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20150515.project.mailkey.2.php | resources/sql/autopatches/20150515.project.mailkey.2.php | <?php
$table = new PhabricatorProject();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $project) {
$id = $project->getID();
echo pht('Adding mail key for project %d...', $id);
echo "\n";
queryfx(
$conn_w,
'UPDATE %T SET mailKey = %s W... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140410.accountsecret.2.php | resources/sql/autopatches/20140410.accountsecret.2.php | <?php
echo pht('Updating users...')."\n";
foreach (new LiskMigrationIterator(new PhabricatorUser()) as $user) {
$id = $user->getID();
echo pht('Updating %d...', $id)."\n";
if (strlen($user->getAccountSecret())) {
continue;
}
queryfx(
$user->establishConnection('w'),
'UPDATE %T SET accountSecre... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20160604.user.01.stringmailprefs.php | resources/sql/autopatches/20160604.user.01.stringmailprefs.php | <?php
$table = new PhabricatorUserPreferences();
$conn_w = $table->establishConnection('w');
// Convert "Mail Format", "Re Prefix" and "Vary Subjects" mail settings to
// string constants to avoid weird stuff where we store "true" and "false" as
// strings in the database.
// Each of these keys will be converted to... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20170918.ref.01.position.php | resources/sql/autopatches/20170918.ref.01.position.php | <?php
$table = new PhabricatorRepositoryRefPosition();
$conn = $table->establishConnection('w');
$key_name = 'key_position';
try {
queryfx(
$conn,
'ALTER TABLE %T DROP KEY %T',
$table->getTableName(),
$key_name);
} catch (AphrontQueryException $ex) {
// This key may or may not exist, depending on ... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20191114.email.02.populate.php | resources/sql/autopatches/20191114.email.02.populate.php | <?php
$table = new PhabricatorUserEmail();
$conn = $table->establishConnection('w');
$iterator = new LiskRawMigrationIterator($conn, $table->getTableName());
foreach ($iterator as $row) {
$phid = $row['phid'];
if (!strlen($phid)) {
queryfx(
$conn,
'UPDATE %R SET phid = %s WHERE id = %d',
$t... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180120.auth.04.vcsphid.php | resources/sql/autopatches/20180120.auth.04.vcsphid.php | <?php
// Populate VCS passwords (which we copied from the old "VCS Password" table
// in the last migration) with new PHIDs.
$table = new PhabricatorAuthPassword();
$conn = $table->establishConnection('w');
$password_type = PhabricatorAuthPasswordPHIDType::TYPECONST;
foreach (new LiskMigrationIterator($table) as $r... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20190412.herald.01.rebuild.php | resources/sql/autopatches/20190412.herald.01.rebuild.php | <?php
// @phase worker
PhabricatorRebuildIndexesWorker::rebuildObjectsWithQuery('HeraldRuleQuery');
| php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20140212.dx.1.armageddon.php | resources/sql/autopatches/20140212.dx.1.armageddon.php | <?php
$conn_w = id(new DifferentialRevision())->establishConnection('w');
$rows = new LiskRawMigrationIterator($conn_w, 'differential_comment');
$content_source = PhabricatorContentSource::newForSource(
PhabricatorOldWorldContentSource::SOURCECONST)->serialize();
echo pht('Migrating Differential comments to modern... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
phorgeit/phorge | https://github.com/phorgeit/phorge/blob/aceebaa4305332265a371282a841609fe926b819/resources/sql/autopatches/20180914.audit.01.mailkey.php | resources/sql/autopatches/20180914.audit.01.mailkey.php | <?php
$commit_table = new PhabricatorRepositoryCommit();
$commit_conn = $commit_table->establishConnection('w');
$commit_name = $commit_table->getTableName();
$properties_table = new PhabricatorMetaMTAMailProperties();
$conn = $properties_table->establishConnection('w');
$iterator = new LiskRawMigrationIterator($com... | php | Apache-2.0 | aceebaa4305332265a371282a841609fe926b819 | 2026-01-05T04:21:50.722734Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.