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 |
|---|---|---|---|---|---|---|---|---|
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20151223.proj.05.updatekeys.php | resources/sql/autopatches/20151223.proj.05.updatekeys.php | <?php
$table = new PhabricatorProject();
$conn_w = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $project) {
$path = $project->getProjectPath();
$key = $project->getProjectPathKey();
if (strlen($path) && ($key !== "\0\0\0\0")) {
continue;
}
$path_key = PhabricatorHash... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20150503.repositorysymbols.2.php | resources/sql/autopatches/20150503.repositorysymbols.2.php | <?php
// NOTE: This migration moved existing symbols from Arcanist Projects to
// Repositories. It stopped running cleanly about two months later, after
// Spaces were introduced. Since this data is not important and can be
// trivially regenerated, just stop running the migration. See T8691.
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20170119.menuitem.motivator.01.php | resources/sql/autopatches/20170119.menuitem.motivator.01.php | <?php
$table = new PhabricatorProfileMenuItemConfiguration();
$conn_w = $table->establishConnection('w');
queryfx(
$conn_w,
'DELETE FROM %T WHERE menuItemKey = "motivator"',
$table->getTableName());
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20170424.user.01.verify.php | resources/sql/autopatches/20170424.user.01.verify.php | <?php
$table = new PhabricatorUser();
$conn = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $user) {
// Ignore users who are verified.
if ($user->getIsEmailVerified()) {
continue;
}
// Ignore unverified users with missing (rare) or unverified (common)
// primary emails... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20171026.ferret.05.ponder.index.php | resources/sql/autopatches/20171026.ferret.05.ponder.index.php | <?php
// This was an old reindexing migration that has been obsoleted. See T13253.
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20190412.dashboard.13.rebuild.php | resources/sql/autopatches/20190412.dashboard.13.rebuild.php | <?php
// @phase worker
PhabricatorRebuildIndexesWorker::rebuildObjectsWithQuery(
'PhabricatorDashboardQuery');
PhabricatorRebuildIndexesWorker::rebuildObjectsWithQuery(
'PhabricatorDashboardPanelQuery');
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20140805.boardcol.2.php | resources/sql/autopatches/20140805.boardcol.2.php | <?php
// Was PhabricatorEdgeConfig::TYPE_COLUMN_HAS_OBJECT
$type_has_object = 44;
$column = new PhabricatorProjectColumn();
$conn_w = $column->establishConnection('w');
$rows = queryfx_all(
$conn_w,
'SELECT src, dst FROM %T WHERE type = %d',
PhabricatorEdgeConfig::TABLE_NAME_EDGE,
$type_has_object);
$cols =... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20170824.search.01.saved.php | resources/sql/autopatches/20170824.search.01.saved.php | <?php
// Before T12956, normal users could reorder (and disable) builtin queries.
// After that change, there is a single global order which can only be
// changed by administrators.
// This migration removes the rows which store individual reordering and
// disabling of queries. If a user had reordered queries in su... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20181219.pholio.02.imagemigrate.php | resources/sql/autopatches/20181219.pholio.02.imagemigrate.php | <?php
// Old images used a "mockID" instead of a "mockPHID" to reference mocks.
// Set the "mockPHID" column to the value that corresponds to the "mockID".
$image = new PholioImage();
$mock = new PholioMock();
$conn = $image->establishConnection('w');
$iterator = new LiskRawMigrationIterator($conn, $image->getTableN... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20140323.harbor.1.renames.php | resources/sql/autopatches/20140323.harbor.1.renames.php | <?php
$names = array(
'CommandBuildStepImplementation',
'LeaseHostBuildStepImplementation',
'PublishFragmentBuildStepImplementation',
'SleepBuildStepImplementation',
'UploadArtifactBuildStepImplementation',
'WaitForPreviousBuildStepImplementation',
);
$tables = array(
id(new HarbormasterBuildStep())->ge... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20150102.policyname.php | resources/sql/autopatches/20150102.policyname.php | <?php
$policies = array(
'Administrators',
'LegalpadSignature',
'LunarPhase',
'Projects',
'Users',
);
$map = array();
foreach ($policies as $policy) {
$old_name = "PhabricatorPolicyRule{$policy}";
$new_name = "Phabricator{$policy}PolicyRule";
$map[$old_name] = $new_name;
}
echo pht('Migrating policie... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20180829.phriction.01.mailkey.php | resources/sql/autopatches/20180829.phriction.01.mailkey.php | <?php
$document_table = new PhrictionDocument();
$document_conn = $document_table->establishConnection('w');
$document_name = $document_table->getTableName();
$properties_table = new PhabricatorMetaMTAMailProperties();
$conn = $properties_table->establishConnection('w');
$iterator = new LiskRawMigrationIterator($doc... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20170811.differential.03.modernxaction.php | resources/sql/autopatches/20170811.differential.03.modernxaction.php | <?php
$map = array(
'0' => 'needs-review',
'1' => 'needs-revision',
'2' => 'accepted',
'3' => 'published',
'4' => 'abandoned',
'5' => 'changes-planned',
);
$table = new DifferentialTransaction();
$conn = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $xaction) {
$type =... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20190206.external.04.providerlink.php | resources/sql/autopatches/20190206.external.04.providerlink.php | <?php
$account_table = new PhabricatorExternalAccount();
$account_conn = $account_table->establishConnection('w');
$table_name = $account_table->getTableName();
$config_table = new PhabricatorAuthProviderConfig();
$config_conn = $config_table->establishConnection('w');
foreach (new LiskRawMigrationIterator($account_... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20150725.slowvote.mailkey.2.php | resources/sql/autopatches/20150725.slowvote.mailkey.2.php | <?php
$table = new PhabricatorSlowvotePoll();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $slowvote) {
$id = $slowvote->getID();
echo pht('Adding mail key for Slowvote %d...', $id);
echo "\n";
queryfx(
$conn_w,
'UPDATE %T SET mailKe... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20210316.almanac.05.service-mailkey.php | resources/sql/autopatches/20210316.almanac.05.service-mailkey.php | <?php
$service_table = new AlmanacService();
$service_conn = $service_table->establishConnection('w');
$properties_table = new PhabricatorMetaMTAMailProperties();
$conn = $properties_table->establishConnection('w');
$iterator = new LiskRawMigrationIterator(
$service_conn,
$service_table->getTableName());
foreac... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20140731.audit.1.subscribers.php | resources/sql/autopatches/20140731.audit.1.subscribers.php | <?php
$table = new PhabricatorRepositoryAuditRequest();
$conn_w = $table->establishConnection('w');
echo pht('Migrating Audit subscribers to subscriptions...')."\n";
foreach (new LiskMigrationIterator($table) as $request) {
$id = $request->getID();
echo pht("Migrating audit %d...\n", $id);
if ($request->getAu... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20160720.calendar.invitetxn.php | resources/sql/autopatches/20160720.calendar.invitetxn.php | <?php
$table = new PhabricatorCalendarEventTransaction();
$conn_w = $table->establishConnection('w');
echo pht(
"Restructuring calendar invite transactions...\n");
foreach (new LiskMigrationIterator($table) as $txn) {
$type = PhabricatorCalendarEventInviteTransaction::TRANSACTIONTYPE;
if ($txn->getTransactionT... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20161004.cal.01.noepoch.php | resources/sql/autopatches/20161004.cal.01.noepoch.php | <?php
$table = new PhabricatorCalendarEvent();
$conn = $table->establishConnection('w');
$table_name = 'calendar_event';
// Long ago, "All Day" events were stored with a start and end date set to
// the earliest possible start and end seconds for the corresponding days. We
// then moved to store all day events with t... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20180910.audit.04.xactions.php | resources/sql/autopatches/20180910.audit.04.xactions.php | <?php
$table = new PhabricatorAuditTransaction();
$conn = $table->establishConnection('w');
$status_map = array(
0 => 'none',
1 => 'needs-audit',
2 => 'concern-raised',
3 => 'partially-audited',
4 => 'audited',
5 => 'needs-verification',
);
$state_type = DiffusionCommitStateTransaction::TRANSACTIONTYPE;
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20140106.macromailkey.2.php | resources/sql/autopatches/20140106.macromailkey.2.php | <?php
echo pht('Adding mailkeys to macros.')."\n";
$table = new PhabricatorFileImageMacro();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $macro) {
$id = $macro->getID();
echo pht('Populating macro %d...', $id)."\n";
if (!$macro->getMailKey()... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20160110.repo.02.slug.php | resources/sql/autopatches/20160110.repo.02.slug.php | <?php
$table = new PhabricatorRepository();
$conn_w = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $repository) {
$slug = $repository->getRepositorySlug();
if ($slug !== null) {
continue;
}
$clone_name = $repository->getDetail('clone-name');
if (!strlen($clone_name)... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20160221.almanac.6.networki.php | resources/sql/autopatches/20160221.almanac.6.networki.php | <?php
// This was an old reindexing migration that has been obsoleted. See T13253.
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20210715.harborcommand.01.xactions.php | resources/sql/autopatches/20210715.harborcommand.01.xactions.php | <?php
// See T13072. Turn the old "process a command" transaction into modular
// transactions that each handle one particular type of command.
$xactions_table = new HarbormasterBuildTransaction();
$xactions_conn = $xactions_table->establishConnection('w');
$row_iterator = new LiskRawMigrationIterator(
$xactions_co... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20141107.phriction.policy.2.php | resources/sql/autopatches/20141107.phriction.policy.2.php | <?php
$table = new PhrictionDocument();
$conn_w = $table->establishConnection('w');
echo pht('Populating Phriction policies.')."\n";
$default_view_policy = PhabricatorPolicies::POLICY_USER;
$default_edit_policy = PhabricatorPolicies::POLICY_USER;
foreach (new LiskMigrationIterator($table) as $doc) {
$id = $doc->g... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20161210.dashboards.02.author.php | resources/sql/autopatches/20161210.dashboards.02.author.php | <?php
// Set authorPHID on Dashboards
//
$table = new PhabricatorDashboard();
$conn_w = $table->establishConnection('w');
$txn_table = new PhabricatorDashboardTransaction();
$txn_conn = $table->establishConnection('r');
echo pht("Building Dashboard authorPHIDs...\n");
foreach (new LiskMigrationIterator($table) as $... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20170528.maniphestdupes.php | resources/sql/autopatches/20170528.maniphestdupes.php | <?php
$table = new ManiphestTransaction();
$add_edges = array();
foreach (new LiskMigrationIterator($table) as $txn) {
$txn_type = $txn->getTransactionType();
if ($txn_type == 'mergedinto') {
// dupe handling as implemented in D10427, which creates a specific txn
$add_edges[] = array(
'src' => $txn... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20150501.calendar.2.reply.php | resources/sql/autopatches/20150501.calendar.2.reply.php | <?php
echo pht('Adding %s to events.', 'mailkeys')."\n";
$table = new PhabricatorCalendarEvent();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $event) {
$id = $event->getID();
echo pht('Populating event %d...', $id)."\n";
queryfx(
$conn_w... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20140808.boardprop.3.php | resources/sql/autopatches/20140808.boardprop.3.php | <?php
$table = new PhabricatorProjectColumn();
$conn_w = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $column) {
$id = $column->getID();
echo pht('Adjusting column %d...', $id)."\n";
if ($column->getSequence() == 0) {
$properties = $column->getProperties();
$properti... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20180504.owners.01.mailkey.php | resources/sql/autopatches/20180504.owners.01.mailkey.php | <?php
$packages_table = new PhabricatorOwnersPackage();
$packages_conn = $packages_table->establishConnection('w');
$packages_name = $packages_table->getTableName();
$properties_table = new PhabricatorMetaMTAMailProperties();
$conn = $properties_table->establishConnection('w');
$iterator = new LiskRawMigrationIterat... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20160222.almanac.1.properties.php | resources/sql/autopatches/20160222.almanac.1.properties.php | <?php
$table = new AlmanacProperty();
$conn_w = $table->establishConnection('w');
// We're going to JSON-encode the value in each row: previously rows stored
// plain strings, but now they store JSON, so we need to update them.
foreach (new LiskMigrationIterator($table) as $property) {
$key = $property->getFieldNa... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20140325.push.3.groups.php | resources/sql/autopatches/20140325.push.3.groups.php | <?php
$conn_w = id(new PhabricatorRepository())->establishConnection('w');
echo pht('Adding transaction log event groups...')."\n";
$logs = queryfx_all(
$conn_w,
'SELECT * FROM %T GROUP BY transactionKey ORDER BY id ASC',
'repository_pushlog');
foreach ($logs as $log) {
$id = $log['id'];
echo pht('Migratin... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20150506.calendarunnamedevents.1.php | resources/sql/autopatches/20150506.calendarunnamedevents.1.php | <?php
echo pht('Retro-naming unnamed events.')."\n";
$table = new PhabricatorCalendarEvent();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $event) {
$id = $event->getID();
if (strlen($event->getName()) == 0) {
echo pht('Renaming event %d...'... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20170320.reviewers.03.migrate.php | resources/sql/autopatches/20170320.reviewers.03.migrate.php | <?php
$table = new DifferentialRevision();
$diff_table = new DifferentialDiff();
$reviewer_table = new DifferentialReviewer();
$table_name = PhabricatorEdgeConfig::TABLE_NAME_EDGE;
$data_name = PhabricatorEdgeConfig::TABLE_NAME_EDGEDATA;
$conn = $table->establishConnection('w');
// Previously "DifferentialRevisionH... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20210316.almanac.11.network-mailkey.php | resources/sql/autopatches/20210316.almanac.11.network-mailkey.php | <?php
$network_table = new AlmanacNetwork();
$network_conn = $network_table->establishConnection('w');
$properties_table = new PhabricatorMetaMTAMailProperties();
$conn = $properties_table->establishConnection('w');
$iterator = new LiskRawMigrationIterator(
$network_conn,
$network_table->getTableName());
foreac... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20180418.alamanc.interface.unique.php | resources/sql/autopatches/20180418.alamanc.interface.unique.php | <?php
$interface_table = new AlmanacInterface();
$binding_table = new AlmanacBinding();
$interface_conn = $interface_table->establishConnection('w');
queryfx(
$interface_conn,
'LOCK TABLES %T WRITE, %T WRITE',
$interface_table->getTableName(),
$binding_table->getTableName());
$seen = array();
foreach (new Li... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20171101.diff.02.populate.php | resources/sql/autopatches/20171101.diff.02.populate.php | <?php
$table = new DifferentialRevision();
$conn = $table->establishConnection('w');
$diff_table = new DifferentialDiff();
foreach (new LiskMigrationIterator($table) as $revision) {
$revision_id = $revision->getID();
$diff_row = queryfx_one(
$conn,
'SELECT phid FROM %T WHERE revisionID = %d ORDER BY id D... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20190215.daemons.01.dropdataid.php | resources/sql/autopatches/20190215.daemons.01.dropdataid.php | <?php
// See T6615. We're about to change the nullability on the "dataID" column,
// but it may have a UNIQUE KEY on it. Make sure we get rid of this key first
// so we don't run into trouble.
// There's no "IF EXISTS" modifier for "ALTER TABLE" so run this as a PHP patch
// instead of an SQL patch.
$table = new Pha... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20151130.phurl.mailkey.2.php | resources/sql/autopatches/20151130.phurl.mailkey.2.php | <?php
$table = new PhabricatorPhurlURL();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $url) {
$id = $url->getID();
echo pht('Adding mail key for Phurl %d...', $id);
echo "\n";
queryfx(
$conn_w,
'UPDATE %T SET mailKey = %s WHERE id =... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20180809.repo_identities.activity.php | resources/sql/autopatches/20180809.repo_identities.activity.php | <?php
// Advise installs to rebuild the repository identities.
// If the install has no commits (or no commits that lack an
// authorIdentityPHID), don't require a rebuild.
$commits = id(new PhabricatorRepositoryCommit())
->loadAllWhere('authorIdentityPHID IS NULL LIMIT 1');
if (!$commits) {
return;
}
try {
i... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20160824.repohint.02.movebad.php | resources/sql/autopatches/20160824.repohint.02.movebad.php | <?php
$table = new PhabricatorRepositoryCommit();
$conn = $table->establishConnection('w');
$rows = queryfx_all(
$conn,
'SELECT fullCommitName FROM repository_badcommit');
$viewer = PhabricatorUser::getOmnipotentUser();
foreach ($rows as $row) {
$identifier = $row['fullCommitName'];
$commit = id(new Diffus... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20170811.differential.01.status.php | resources/sql/autopatches/20170811.differential.01.status.php | <?php
// Migrate saved Differential revision queries from using a "<select />"
// control with hard-coded status groups for status selection to using a
// tokenizer with status functions.
$table = new PhabricatorSavedQuery();
$conn = $table->establishConnection('w');
$status_map = array(
'status-open' => array('op... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20160221.almanac.4.servicei.php | resources/sql/autopatches/20160221.almanac.4.servicei.php | <?php
// This was an old reindexing migration that has been obsoleted. See T13253.
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20160122.project.1.boarddefault.php | resources/sql/autopatches/20160122.project.1.boarddefault.php | <?php
// Populate the newish `hasWorkboard` column for projects with workboard.
// Set the default menu item to "Workboard" for projects which used to have
// that default.
$project_table = new PhabricatorProject();
$conn_w = $project_table->establishConnection('w');
$panel_table = id(new PhabricatorProfileMenuItemC... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20161212.dashboardpanel.02.author.php | resources/sql/autopatches/20161212.dashboardpanel.02.author.php | <?php
// Set authorPHID on Dashboard Panels
//
$table = new PhabricatorDashboardPanel();
$conn_w = $table->establishConnection('w');
$txn_table = new PhabricatorDashboardPanelTransaction();
$txn_conn = $table->establishConnection('r');
echo pht("Building Dashboard Panel authorPHIDs...\n");
foreach (new LiskMigratio... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20160715.event.03.allday.php | resources/sql/autopatches/20160715.event.03.allday.php | <?php
// This migration was replaced by "20161004.cal.01.noepoch.php".
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20150622.metamta.2.phid-mig.php | resources/sql/autopatches/20150622.metamta.2.phid-mig.php | <?php
$table = new PhabricatorMetaMTAMail();
$conn_w = $table->establishConnection('w');
echo pht('Assigning PHIDs to mails...')."\n";
foreach (new LiskMigrationIterator($table) as $mail) {
$id = $mail->getID();
echo pht('Updating mail %d...', $id)."\n";
if ($mail->getPHID()) {
continue;
}
queryfx(
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20190207.packages.04.xactions.php | resources/sql/autopatches/20190207.packages.04.xactions.php | <?php
$table = new PhabricatorOwnersPackageTransaction();
$conn = $table->establishConnection('w');
$iterator = new LiskRawMigrationIterator($conn, $table->getTableName());
// Migrate "Auditing State" transactions for Owners Packages from old values
// (which were "0" or "1", as JSON integer literals, without quotes)... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20141113.auditdupes.php | resources/sql/autopatches/20141113.auditdupes.php | <?php
$table = new PhabricatorRepositoryAuditRequest();
$conn_w = $table->establishConnection('w');
echo pht('Removing duplicate Audit requests...')."\n";
$seen_audit_map = array();
foreach (new LiskMigrationIterator($table) as $request) {
$commit_phid = $request->getCommitPHID();
$auditor_phid = $request->getAud... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20170131.dashboard.personal.01.php | resources/sql/autopatches/20170131.dashboard.personal.01.php | <?php
$table = new PhabricatorDashboard();
$conn = $table->establishConnection('r');
$table_name = 'dashboard_install';
$search_table = new PhabricatorProfileMenuItemConfiguration();
$search_conn = $search_table->establishConnection('w');
$search_table_name = 'search_profilepanelconfiguration';
$viewer = Phabricator... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20150725.badges.mailkey.2.php | resources/sql/autopatches/20150725.badges.mailkey.2.php | <?php
$table = new PhabricatorBadgesBadge();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $badge) {
$id = $badge->getID();
echo pht('Adding mail key for badge %d...', $id);
echo "\n";
queryfx(
$conn_w,
'UPDATE %T SET mailKey = %s WHE... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20140722.audit.4.migtext.php | resources/sql/autopatches/20140722.audit.4.migtext.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 comment text to modern st... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/autopatches/20140914.betaproto.php | resources/sql/autopatches/20140914.betaproto.php | <?php
$old_key = 'phabricator.show-beta-applications';
$new_key = 'phabricator.show-prototypes';
echo pht("Migrating '%s' to '%s'...", $old_key, $new_key)."\n";
if (PhabricatorEnv::getEnvConfig($new_key)) {
echo pht('Skipping migration, new data is already set.')."\n";
return;
}
$old = PhabricatorEnv::getEnvCon... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130913.maniphest.1.migratesearch.php | resources/sql/patches/20130913.maniphest.1.migratesearch.php | <?php
// This was a complex migration that modernized old search queries. It was
// removed after giving installs a year to perform it because it would be
// unreasonably complex to maintain and users can easily recreate queries.
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20131004.dxreviewers.php | resources/sql/patches/20131004.dxreviewers.php | <?php
$table = new DifferentialRevision();
$conn_w = $table->establishConnection('w');
// NOTE: We migrate by revision because the relationship table doesn't have
// an "id" column.
foreach (new LiskMigrationIterator($table) as $revision) {
$revision_id = $revision->getID();
$revision_phid = $revision->getPHID()... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/059.engines.php | resources/sql/patches/059.engines.php | <?php
$conn = $schema_conn;
$tables = queryfx_all(
$conn,
"SELECT TABLE_SCHEMA db, TABLE_NAME tbl
FROM information_schema.TABLES s
WHERE s.TABLE_SCHEMA LIKE %>
AND s.TABLE_NAME != 'search_documentfield'
AND s.ENGINE != 'InnoDB'",
'{$NAMESPACE}_');
if (!$tables) {
return;
}
echo pht(
"The... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20131118.ownerorder.php | resources/sql/patches/20131118.ownerorder.php | <?php
$table = new ManiphestTask();
$conn_w = $table->establishConnection('w');
$user_table = new PhabricatorUser();
$user_conn = $user_table->establishConnection('r');
foreach (new LiskMigrationIterator($table) as $task) {
$id = $task->getID();
echo pht('Checking task %s...', "T{$id}")."\n";
$owner_phid = $t... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130915.maniphestmigrate.php | resources/sql/patches/20130915.maniphestmigrate.php | <?php
$conn_w = id(new ManiphestTask())->establishConnection('w');
$table_name = id(new ManiphestCustomFieldStorage())->getTableName();
$rows = new LiskRawMigrationIterator($conn_w, 'maniphest_taskauxiliarystorage');
echo pht('Migrating custom storage for Maniphest fields...')."\n";
foreach ($rows as $row) {
$phid... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130805.pastemailkeypop.php | resources/sql/patches/20130805.pastemailkeypop.php | <?php
echo pht('Populating pastes with mail keys...')."\n";
$table = new PhabricatorPaste();
$table->openTransaction();
$conn_w = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $paste) {
$id = $paste->getID();
echo "P{$id}: ";
if (!$paste->getMailKey()) {
queryfx(
$c... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130801.pastexactions.php | resources/sql/patches/20130801.pastexactions.php | <?php
// Long ago, this migration populated initial "create" transactions for old
// pastes from before transactions came into existence. It was removed after
// about three years.
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130502.countdownrevamp2.php | resources/sql/patches/20130502.countdownrevamp2.php | <?php
echo pht('Giving countdowns PHIDs');
$table = new PhabricatorCountdown();
$table->openTransaction();
foreach (new LiskMigrationIterator($table) as $countdown) {
if ($countdown->getPHID()) {
continue;
}
echo '.';
queryfx(
$countdown->establishConnection('w'),
'UPDATE %T SET phid = %s WHERE ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/legalpad-mailkey-populate.php | resources/sql/patches/legalpad-mailkey-populate.php | <?php
echo pht('Populating Legalpad Documents with mail keys...')."\n";
$table = new LegalpadDocument();
$table->openTransaction();
foreach (new LiskMigrationIterator($table) as $document) {
$id = $document->getID();
echo pht('Document %s: ', $id);
if (!$document->getMailKey()) {
queryfx(
$document->... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130802.heraldphids.php | resources/sql/patches/20130802.heraldphids.php | <?php
$table = new HeraldRule();
$conn_w = $table->establishConnection('w');
echo pht('Assigning PHIDs to Herald Rules...')."\n";
foreach (new LiskMigrationIterator(new HeraldRule()) as $rule) {
$id = $rule->getID();
echo pht('Rule %d.', $id)."\n";
if ($rule->getPHID()) {
continue;
}
queryfx(
$co... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130820.file-mailkey-populate.php | resources/sql/patches/20130820.file-mailkey-populate.php | <?php
echo pht('Populating files with mail keys...')."\n";
$table = new PhabricatorFile();
$table_name = $table->getTableName();
$conn_w = $table->establishConnection('w');
$conn_w->openTransaction();
$sql = array();
foreach (new LiskRawMigrationIterator($conn_w, 'file') as $row) {
// NOTE: MySQL requires that th... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130508.releephtransactionsmig.php | resources/sql/patches/20130508.releephtransactionsmig.php | <?php
// Previously, this migrated ReleephRequestEvents into ApplicationTransactions.
// Only Facebook ever generated meaningful ReleephRequestEvent data, and has
// already migrated, so this was cleaned up when ReleephRequestEvent was
// removed.
echo pht('(This migration is obsolete.)')."\n";
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/migrate-project-edges.php | resources/sql/patches/migrate-project-edges.php | <?php
echo pht('Migrating project members to edges...')."\n";
$table = new PhabricatorProject();
$table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $proj) {
$id = $proj->getID();
echo pht('Project %d: ', $id);
$members = queryfx_all(
$proj->establishConnection('w'),
'SELECT... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/emailtableport.php | resources/sql/patches/emailtableport.php | <?php
echo pht('Migrating user emails...')."\n";
$table = new PhabricatorUser();
$table->openTransaction();
$conn = $table->establishConnection('w');
$emails = queryfx_all(
$conn,
'SELECT phid, email FROM %T LOCK IN SHARE MODE',
$table->getTableName());
$emails = ipull($emails, 'email', 'phid');
$etable = ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130507.releephrqmailkeypop.php | resources/sql/patches/20130507.releephrqmailkeypop.php | <?php
echo pht('Populating Releeph requests with mail keys...')."\n";
$table = new ReleephRequest();
$table->openTransaction();
// From ponder-mailkey-populate.php...
foreach (new LiskMigrationIterator($table) as $rq) {
$id = $rq->getID();
echo "RQ{$id}: ";
if (!$rq->getMailKey()) {
queryfx(
$rq->es... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130728.ponderunique.php | resources/sql/patches/20130728.ponderunique.php | <?php
$map = array();
echo pht('Merging duplicate answers by authors...')."\n";
$atable = new PonderAnswer();
$conn_w = $atable->establishConnection('w');
$conn_w->openTransaction();
$answers = new LiskMigrationIterator(new PonderAnswer());
foreach ($answers as $answer) {
$aid = $answer->getID();
$qid = $answer... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130218.updatechannelid.php | resources/sql/patches/20130218.updatechannelid.php | <?php
echo pht('Updating channel IDs of previous chatlog events...')."\n";
$event_table = new PhabricatorChatLogEvent();
$channel_table = new PhabricatorChatLogChannel();
$event_table->openTransaction();
$channel_table->openTransaction();
$event_table->beginReadLocking();
$channel_table->beginReadLocking();
$events... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130728.ponderxcomment.php | resources/sql/patches/20130728.ponderxcomment.php | <?php
$qtable = new PonderQuestionTransaction();
$atable = new PonderAnswerTransaction();
$conn_w = $qtable->establishConnection('w');
$conn_w->openTransaction();
echo pht('Migrating Ponder comments to %s...', 'ApplicationTransactions')."\n";
$rows = new LiskRawMigrationIterator($conn_w, 'ponder_comment');
foreach ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130621.diffcommentphidmig.php | resources/sql/patches/20130621.diffcommentphidmig.php | <?php
// This patch is unnecessary and was nuked.
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/liskcounters.php | resources/sql/patches/liskcounters.php | <?php
// Switch PhabricatorWorkerActiveTask from auto-increment IDs to counter IDs.
// Set the initial counter ID to be larger than any known task ID.
$active_table = new PhabricatorWorkerActiveTask();
$archive_table = new PhabricatorWorkerArchiveTask();
$old_table = 'worker_task';
$conn_w = $active_table->establis... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130711.pholioimageobsolete.php | resources/sql/patches/20130711.pholioimageobsolete.php | <?php
echo pht('Giving Pholio images PHIDs');
$table = new PholioImage();
$table->openTransaction();
foreach (new LiskMigrationIterator($table) as $image) {
if ($image->getPHID()) {
continue;
}
echo '.';
queryfx(
$image->establishConnection('w'),
'UPDATE %T SET phid = %s WHERE id = %d',
$ima... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130530.sessionhash.php | resources/sql/patches/20130530.sessionhash.php | <?php
// See T13225. Long ago, this upgraded session key storage from unhashed to
// HMAC-SHA1 here. We later upgraded storage to HMAC-SHA256, so this is initial
// upgrade is now fairly pointless. Dropping this migration entirely only logs
// users out of installs that waited more than 5 years to upgrade, which seems... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130716.archivememberlessprojects.php | resources/sql/patches/20130716.archivememberlessprojects.php | <?php
echo pht('Archiving projects with no members...')."\n";
$table = new PhabricatorProject();
$table->openTransaction();
foreach (new LiskMigrationIterator($table) as $project) {
$members = PhabricatorEdgeQuery::loadDestinationPHIDs(
$project->getPHID(),
PhabricatorProjectProjectHasMemberEdgeType::EDGEC... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20131112.userverified.2.mig.php | resources/sql/patches/20131112.userverified.2.mig.php | <?php
$table = new PhabricatorUser();
$conn_w = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $user) {
$username = $user->getUsername();
echo pht('Migrating %s...', $username)."\n";
if ($user->getIsEmailVerified()) {
// Email already verified.
continue;
}
$primary ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130409.commitdrev.php | resources/sql/patches/20130409.commitdrev.php | <?php
echo pht('Migrating %s to edges...', 'differential.revisionPHID')."\n";
$commit_table = new PhabricatorRepositoryCommit();
$data_table = new PhabricatorRepositoryCommitData();
$editor = new PhabricatorEdgeEditor();
$commit_table->establishConnection('w');
$edges = 0;
foreach (new LiskMigrationIterator($commit_t... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20131106.diffphid.2.mig.php | resources/sql/patches/20131106.diffphid.2.mig.php | <?php
$diff_table = new DifferentialDiff();
$conn_w = $diff_table->establishConnection('w');
$size = 1000;
$row_iter = id(new LiskMigrationIterator($diff_table))->setPageSize($size);
$chunk_iter = new PhutilChunkedIterator($row_iter, $size);
foreach ($chunk_iter as $chunk) {
$sql = array();
foreach ($chunk as ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130703.legalpaddocdenorm.php | resources/sql/patches/20130703.legalpaddocdenorm.php | <?php
echo pht(
"Populating Legalpad Documents with titles, %s, and %s...\n",
'recentContributorPHIDs',
'contributorCounts');
$table = new LegalpadDocument();
$table->openTransaction();
foreach (new LiskMigrationIterator($table) as $document) {
$updated = false;
$id = $document->getID();
echo pht('Docume... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/117.repositorydescription.php | resources/sql/patches/117.repositorydescription.php | <?php
$conn = id(new PhabricatorRepository())->establishConnection('w');
if (queryfx_one($conn, "SHOW COLUMNS FROM `repository` LIKE 'description'")) {
queryfx($conn, 'ALTER TABLE `repository` DROP `description`');
}
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20121209.xmacromigrate.php | resources/sql/patches/20121209.xmacromigrate.php | <?php
echo pht('Giving image macros PHIDs');
$table = new PhabricatorFileImageMacro();
$table->openTransaction();
foreach (new LiskMigrationIterator($table) as $macro) {
if ($macro->getPHID()) {
continue;
}
echo '.';
queryfx(
$macro->establishConnection('w'),
'UPDATE %T SET phid = %s WHERE id = ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/migrate-maniphest-dependencies.php | resources/sql/patches/migrate-maniphest-dependencies.php | <?php
// From 2013-2016, this migration moved dependent tasks to edges.
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130403.conpherencecachemig.php | resources/sql/patches/20130403.conpherencecachemig.php | <?php
echo pht(
"Migrating data from conpherence transactions to conpherence 'cache'...\n");
$table = new ConpherenceThread();
$table->openTransaction();
$conn_w = $table->establishConnection('w');
$participant_table = new ConpherenceParticipant();
$conpherences = new LiskMigrationIterator($table);
foreach ($conp... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20131020.pxactionmig.php | resources/sql/patches/20131020.pxactionmig.php | <?php
$project_table = new PhabricatorProject();
$conn_w = $project_table->establishConnection('w');
$conn_w->openTransaction();
$src_table = 'project_legacytransaction';
$dst_table = 'project_transaction';
echo pht('Migrating Project transactions to new format...')."\n";
$content_source = PhabricatorContentSource:... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130619.authconf.php | resources/sql/patches/20130619.authconf.php | <?php
$config_map = array(
'PhabricatorLDAPAuthProvider' => array(
'enabled' => 'ldap.auth-enabled',
'registration' => true,
'type' => 'ldap',
'domain' => 'self',
),
'PhabricatorAuthProviderOAuthDisqus' => array(
'enabled' => 'disqus.auth-enabled',
'registration' => 'disqus.r... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/090.forceuniqueprojectnames.php | resources/sql/patches/090.forceuniqueprojectnames.php | <?php
echo pht('Ensuring project names are unique enough...')."\n";
$table = new PhabricatorProject();
$table->openTransaction();
$table->beginReadLocking();
$projects = $table->loadAll();
$slug_map = array();
foreach ($projects as $project) {
$slug = PhabricatorSlug::normalizeProjectSlug($project->getName());
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/098.heraldruletypemigration.php | resources/sql/patches/098.heraldruletypemigration.php | <?php
echo pht("Checking for rules that can be converted to 'personal'.")."\n";
$table = new HeraldRule();
$table->openTransaction();
$table->beginReadLocking();
$rules = $table->loadAll();
foreach ($rules as $rule) {
if ($rule->getRuleType() !== HeraldRuleTypeConfig::RULE_TYPE_PERSONAL) {
$actions = $rule->lo... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20131205.buildstepordermig.php | resources/sql/patches/20131205.buildstepordermig.php | <?php
$table = new HarbormasterBuildPlan();
$conn_w = $table->establishConnection('w');
$viewer = PhabricatorUser::getOmnipotentUser();
// Since HarbormasterBuildStepQuery has been updated to handle the
// correct order, we can't use the built in database access.
foreach (new LiskMigrationIterator($table) as $plan) ... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/079.nametokenindex.php | resources/sql/patches/079.nametokenindex.php | <?php
echo pht('Indexing username tokens for typeaheads...')."\n";
$table = new PhabricatorUser();
$table->openTransaction();
$table->beginReadLocking();
$users = $table->loadAll();
echo pht('%d users to index', count($users));
foreach ($users as $user) {
$user->updateNameTokens();
echo '.';
}
$table->endReadLo... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130611.migrateoauth.php | resources/sql/patches/20130611.migrateoauth.php | <?php
$table = new PhabricatorUser();
$conn = $table->establishConnection('w');
$table_name = 'user_oauthinfo';
foreach (new LiskRawMigrationIterator($conn, $table_name) as $row) {
throw new Exception(
pht(
'This database has ancient OAuth account data and is too old to '.
'upgrade directly to a mod... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130715.votecomments.php | resources/sql/patches/20130715.votecomments.php | <?php
echo pht('Moving Slowvote comments to transactions...')."\n";
$viewer = PhabricatorUser::getOmnipotentUser();
$table_xaction = new PhabricatorSlowvoteTransaction();
$table_comment = new PhabricatorSlowvoteTransactionComment();
$conn_w = $table_xaction->establishConnection('w');
$comments = new LiskRawMigratio... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/111.commitauditmigration.php | resources/sql/patches/111.commitauditmigration.php | <?php
echo pht('Updating old commit authors...')."\n";
$table = new PhabricatorRepositoryCommit();
$table->openTransaction();
$conn = $table->establishConnection('w');
$data = new PhabricatorRepositoryCommitData();
$commits = queryfx_all(
$conn,
'SELECT c.id id, c.authorPHID authorPHID, d.commitDetails details
... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130912.maniphest.4.fillindex.php | resources/sql/patches/20130912.maniphest.4.fillindex.php | <?php
// This previously updated the PROJ index, but HEAD can no longer reindex
// old PROJ records properly (since fields have been added to various places)
// and this migration is 6 months old and optional. Just skip it.
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/081.filekeys.php | resources/sql/patches/081.filekeys.php | <?php
echo pht('Generating file keys...')."\n";
$table = new PhabricatorFile();
$table->openTransaction();
$table->beginReadLocking();
$files = $table->loadAllWhere('secretKey IS NULL');
echo pht('%d files to generate keys for', count($files));
foreach ($files as $file) {
queryfx(
$file->establishConnection('w'... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/131.migraterevisionquery.php | resources/sql/patches/131.migraterevisionquery.php | <?php
// This migration has been dropped, see T7604 for details.
| php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/093.gitremotes.php | resources/sql/patches/093.gitremotes.php | <?php
echo pht('Stripping remotes from repository default branches...')."\n";
$table = new PhabricatorRepository();
$table->openTransaction();
$conn_w = $table->establishConnection('w');
$repos = queryfx_all(
$conn_w,
'SELECT id, name, details FROM %T WHERE versionControlSystem = %s FOR UPDATE',
$table->getTab... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130921.xmigratemaniphest.php | resources/sql/patches/20130921.xmigratemaniphest.php | <?php
$task_table = new ManiphestTask();
$conn_w = $task_table->establishConnection('w');
$rows = new LiskRawMigrationIterator($conn_w, 'maniphest_transaction');
$conn_w->openTransaction();
// NOTE: These were the correct table names at the time of this patch.
$xaction_table_name = 'maniphest_transactionpro';
$comme... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20130611.nukeldap.php | resources/sql/patches/20130611.nukeldap.php | <?php
$table = new PhabricatorUser();
$conn = $table->establishConnection('w');
$table_name = 'user_ldapinfo';
foreach (new LiskRawMigrationIterator($conn, $table_name) as $row) {
throw new Exception(
pht(
'This database has ancient LDAP account data and is too old to upgrade '.
'directly to a moder... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
phacility/phabricator | https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/resources/sql/patches/20131217.pushlogphid.2.mig.php | resources/sql/patches/20131217.pushlogphid.2.mig.php | <?php
$table = new PhabricatorRepositoryPushLog();
$conn_w = $table->establishConnection('w');
echo pht('Assigning PHIDs to push logs...')."\n";
$logs = new LiskMigrationIterator($table);
foreach ($logs as $log) {
$id = $log->getID();
echo pht('Updating %s...', $id)."\n";
queryfx(
$conn_w,
'UPDATE %T S... | php | Apache-2.0 | 5720a38cfe95b00ca4be5016dd0d2f3195f4fa04 | 2026-01-04T15:03:23.651835Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.