Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14406210
D18613.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D18613.diff
View Options
diff --git a/resources/sql/autopatches/20170915.ref.02.drop.id.sql b/resources/sql/autopatches/20170915.ref.02.drop.id.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20170915.ref.02.drop.id.sql
@@ -0,0 +1,2 @@
+ALTER TABLE {$NAMESPACE}_repository.repository_refcursor
+ DROP COLUMN commitIdentifier;
diff --git a/resources/sql/autopatches/20170915.ref.03.drop.closed.sql b/resources/sql/autopatches/20170915.ref.03.drop.closed.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20170915.ref.03.drop.closed.sql
@@ -0,0 +1,2 @@
+ALTER TABLE {$NAMESPACE}_repository.repository_refcursor
+ DROP COLUMN isClosed;
diff --git a/resources/sql/autopatches/20170915.ref.04.uniq.sql b/resources/sql/autopatches/20170915.ref.04.uniq.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20170915.ref.04.uniq.sql
@@ -0,0 +1,2 @@
+ALTER TABLE {$NAMESPACE}_repository.repository_refcursor
+ ADD UNIQUE KEY `key_ref` (repositoryPHID, refType, refNameHash);
diff --git a/src/applications/repository/storage/PhabricatorRepositoryRefCursor.php b/src/applications/repository/storage/PhabricatorRepositoryRefCursor.php
--- a/src/applications/repository/storage/PhabricatorRepositoryRefCursor.php
+++ b/src/applications/repository/storage/PhabricatorRepositoryRefCursor.php
@@ -19,8 +19,6 @@
protected $refNameHash;
protected $refNameRaw;
protected $refNameEncoding;
- protected $commitIdentifier;
- protected $isClosed = 0;
private $repository = self::ATTACHABLE;
@@ -34,13 +32,12 @@
self::CONFIG_COLUMN_SCHEMA => array(
'refType' => 'text32',
'refNameHash' => 'bytes12',
- 'commitIdentifier' => 'text40',
'refNameEncoding' => 'text16?',
- 'isClosed' => 'bool',
),
self::CONFIG_KEY_SCHEMA => array(
- 'key_cursor' => array(
+ 'key_ref' => array(
'columns' => array('repositoryPHID', 'refType', 'refNameHash'),
+ 'unique' => true,
),
),
) + parent::getConfiguration();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 10:23 AM (19 h, 41 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6923511
Default Alt Text
D18613.diff (1 KB)
Attached To
Mode
D18613: Remove obsolete columns from RefCursor table
Attached
Detach File
Event Timeline
Log In to Comment