Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15436820
D21617.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D21617.diff
View Options
diff --git a/resources/sql/autopatches/20210315.affectedpath.01.epoch.sql b/resources/sql/autopatches/20210315.affectedpath.01.epoch.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20210315.affectedpath.01.epoch.sql
@@ -0,0 +1,2 @@
+ALTER TABLE {$NAMESPACE}_differential.differential_affectedpath
+ DROP epoch;
diff --git a/resources/sql/autopatches/20210315.affectedpath.02.repositoryid.sql b/resources/sql/autopatches/20210315.affectedpath.02.repositoryid.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20210315.affectedpath.02.repositoryid.sql
@@ -0,0 +1,2 @@
+ALTER TABLE {$NAMESPACE}_differential.differential_affectedpath
+ CHANGE repositoryID repositoryID INT UNSIGNED;
diff --git a/src/applications/differential/engine/DifferentialAffectedPathEngine.php b/src/applications/differential/engine/DifferentialAffectedPathEngine.php
--- a/src/applications/differential/engine/DifferentialAffectedPathEngine.php
+++ b/src/applications/differential/engine/DifferentialAffectedPathEngine.php
@@ -32,7 +32,7 @@
if ($repository) {
$repository_id = $repository->getID();
} else {
- return;
+ $repository_id = null;
}
$paths = $this->getAffectedPaths();
@@ -48,10 +48,9 @@
foreach ($path_ids as $path_id) {
$sql[] = qsprintf(
$conn,
- '(%d, %d, %d, %d)',
+ '(%nd, %d, %d)',
$repository_id,
$path_id,
- PhabricatorTime::getNow(),
$revision->getID());
}
@@ -64,7 +63,7 @@
foreach (PhabricatorLiskDAO::chunkSQL($sql) as $chunk) {
queryfx(
$conn,
- 'INSERT INTO %R (repositoryID, pathID, epoch, revisionID) VALUES %LQ',
+ 'INSERT INTO %R (repositoryID, pathID, revisionID) VALUES %LQ',
$table,
$chunk);
}
diff --git a/src/applications/differential/storage/DifferentialAffectedPath.php b/src/applications/differential/storage/DifferentialAffectedPath.php
--- a/src/applications/differential/storage/DifferentialAffectedPath.php
+++ b/src/applications/differential/storage/DifferentialAffectedPath.php
@@ -8,7 +8,6 @@
protected $repositoryID;
protected $pathID;
- protected $epoch;
protected $revisionID;
protected function getConfiguration() {
@@ -16,15 +15,16 @@
self::CONFIG_TIMESTAMPS => false,
self::CONFIG_COLUMN_SCHEMA => array(
'id' => null,
+ 'repositoryID' => 'id?',
),
self::CONFIG_KEY_SCHEMA => array(
'PRIMARY' => null,
- 'repositoryID' => array(
- 'columns' => array('repositoryID', 'pathID', 'epoch'),
- ),
'revisionID' => array(
'columns' => array('revisionID'),
),
+ 'key_path' => array(
+ 'columns' => array('pathID', 'repositoryID'),
+ ),
),
) + parent::getConfiguration();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 26, 4:37 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7712414
Default Alt Text
D21617.diff (2 KB)
Attached To
Mode
D21617: Update table schema for "AffectedPath" table
Attached
Detach File
Event Timeline
Log In to Comment