mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-28 00:10:57 +01:00
Add storage and classes for CustomField in Differential
Summary: Ref T3886. Adds the storage, indexes, and storage classes for modernizing Differential custom fields. Test Plan: Ran `storage upgrade`. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3886 Differential Revision: https://secure.phabricator.com/D7138
This commit is contained in:
parent
9b3d7b0dba
commit
5677cd23bd
5 changed files with 66 additions and 0 deletions
29
resources/sql/patches/20130926.dcustom.sql
Normal file
29
resources/sql/patches/20130926.dcustom.sql
Normal file
|
@ -0,0 +1,29 @@
|
|||
CREATE TABLE {$NAMESPACE}_differential.differential_customfieldstorage (
|
||||
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
objectPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
||||
fieldIndex CHAR(12) NOT NULL COLLATE utf8_bin,
|
||||
fieldValue LONGTEXT NOT NULL,
|
||||
UNIQUE KEY (objectPHID, fieldIndex)
|
||||
) ENGINE=InnoDB, COLLATE utf8_general_ci;
|
||||
|
||||
CREATE TABLE {$NAMESPACE}_differential.differential_customfieldstringindex (
|
||||
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
objectPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
||||
indexKey VARCHAR(12) NOT NULL COLLATE utf8_bin,
|
||||
indexValue LONGTEXT NOT NULL COLLATE utf8_general_ci,
|
||||
|
||||
KEY `key_join` (objectPHID, indexKey, indexValue(64)),
|
||||
KEY `key_find` (indexKey, indexValue(64))
|
||||
|
||||
) ENGINE=InnoDB, COLLATE utf8_general_ci;
|
||||
|
||||
CREATE TABLE {$NAMESPACE}_differential.differential_customfieldnumericindex (
|
||||
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
objectPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
||||
indexKey VARCHAR(12) NOT NULL COLLATE utf8_bin,
|
||||
indexValue BIGINT NOT NULL,
|
||||
|
||||
KEY `key_join` (objectPHID, indexKey, indexValue),
|
||||
KEY `key_find` (indexKey, indexValue)
|
||||
|
||||
) ENGINE=InnoDB, COLLATE utf8_general_ci;
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialCustomFieldNumericIndex
|
||||
extends PhabricatorCustomFieldNumericIndexStorage {
|
||||
|
||||
public function getApplicationName() {
|
||||
return 'differential';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialCustomFieldStorage
|
||||
extends PhabricatorCustomFieldStorage {
|
||||
|
||||
public function getApplicationName() {
|
||||
return 'differential';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialCustomFieldStringIndex
|
||||
extends PhabricatorCustomFieldStringIndexStorage {
|
||||
|
||||
public function getApplicationName() {
|
||||
return 'differential';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1636,6 +1636,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList {
|
|||
'type' => 'sql',
|
||||
'name' => $this->getPatchPath('20130925.xpolicy.sql'),
|
||||
),
|
||||
'20130926.dcustom.sql' => array(
|
||||
'type' => 'sql',
|
||||
'name' => $this->getPatchPath('20130926.dcustom.sql'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue