Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14081355
D10581.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D10581.diff
View Options
diff --git a/resources/sql/autopatches/20140926.schema.05.dropprojaffil.sql b/resources/sql/autopatches/20140926.schema.05.dropprojaffil.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20140926.schema.05.dropprojaffil.sql
@@ -0,0 +1 @@
+DROP TABLE {$NAMESPACE}_project.project_affiliation;
diff --git a/resources/sql/autopatches/20140926.schema.06.dropsubproject.sql b/resources/sql/autopatches/20140926.schema.06.dropsubproject.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20140926.schema.06.dropsubproject.sql
@@ -0,0 +1 @@
+DROP TABLE {$NAMESPACE}_project.project_subproject;
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2052,6 +2052,7 @@
'PhabricatorProjectProjectHasObjectEdgeType' => 'applications/project/edge/PhabricatorProjectProjectHasObjectEdgeType.php',
'PhabricatorProjectProjectPHIDType' => 'applications/project/phid/PhabricatorProjectProjectPHIDType.php',
'PhabricatorProjectQuery' => 'applications/project/query/PhabricatorProjectQuery.php',
+ 'PhabricatorProjectSchemaSpec' => 'applications/project/storage/PhabricatorProjectSchemaSpec.php',
'PhabricatorProjectSearchEngine' => 'applications/project/query/PhabricatorProjectSearchEngine.php',
'PhabricatorProjectSearchIndexer' => 'applications/project/search/PhabricatorProjectSearchIndexer.php',
'PhabricatorProjectSlug' => 'applications/project/storage/PhabricatorProjectSlug.php',
@@ -5018,6 +5019,7 @@
'PhabricatorProjectProjectHasObjectEdgeType' => 'PhabricatorEdgeType',
'PhabricatorProjectProjectPHIDType' => 'PhabricatorPHIDType',
'PhabricatorProjectQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
+ 'PhabricatorProjectSchemaSpec' => 'PhabricatorConfigSchemaSpec',
'PhabricatorProjectSearchEngine' => 'PhabricatorApplicationSearchEngine',
'PhabricatorProjectSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
'PhabricatorProjectSlug' => 'PhabricatorProjectDAO',
diff --git a/src/applications/config/schema/PhabricatorConfigSchemaSpec.php b/src/applications/config/schema/PhabricatorConfigSchemaSpec.php
--- a/src/applications/config/schema/PhabricatorConfigSchemaSpec.php
+++ b/src/applications/config/schema/PhabricatorConfigSchemaSpec.php
@@ -170,6 +170,7 @@
array(
'PRIMARY' => array(
'columns' => array('counterName'),
+ 'unique' => true,
),
));
}
diff --git a/src/applications/maniphest/storage/ManiphestTaskSubscriber.php b/src/applications/maniphest/storage/ManiphestTaskSubscriber.php
--- a/src/applications/maniphest/storage/ManiphestTaskSubscriber.php
+++ b/src/applications/maniphest/storage/ManiphestTaskSubscriber.php
@@ -9,6 +9,19 @@
return array(
self::CONFIG_IDS => self::IDS_MANUAL,
self::CONFIG_TIMESTAMPS => false,
+ self::CONFIG_COLUMN_SCHEMA => array(
+ 'id' => null,
+ ),
+ self::CONFIG_KEY_SCHEMA => array(
+ 'PRIMARY' => array(
+ 'columns' => array('subscriberPHID', 'taskPHID'),
+ 'unique' => true,
+ ),
+ 'taskPHID' => array(
+ 'columns' => array('taskPHID', 'subscriberPHID'),
+ 'unique' => true,
+ ),
+ ),
);
}
diff --git a/src/applications/project/storage/PhabricatorProject.php b/src/applications/project/storage/PhabricatorProject.php
--- a/src/applications/project/storage/PhabricatorProject.php
+++ b/src/applications/project/storage/PhabricatorProject.php
@@ -121,6 +121,37 @@
self::CONFIG_SERIALIZATION => array(
'subprojectPHIDs' => self::SERIALIZATION_JSON,
),
+ self::CONFIG_COLUMN_SCHEMA => array(
+ 'name' => 'text255',
+ 'status' => 'text32',
+ 'phrictionSlug' => 'text128?',
+ 'joinPolicy' => 'policy',
+ 'isMembershipLocked' => 'bool',
+ 'profileImagePHID' => 'phid?',
+ 'icon' => 'text32',
+ 'color' => 'text32',
+ ),
+ self::CONFIG_KEY_SCHEMA => array(
+ 'key_phid' => null,
+ 'phid' => array(
+ 'columns' => array('phid'),
+ 'unique' => true,
+ ),
+ 'key_icon' => array(
+ 'columns' => array('icon'),
+ ),
+ 'key_color' => array(
+ 'columns' => array('color'),
+ ),
+ 'phrictionSlug' => array(
+ 'columns' => array('phrictionSlug'),
+ 'unique' => true,
+ ),
+ 'name' => array(
+ 'columns' => array('name'),
+ 'unique' => true,
+ ),
+ ),
) + parent::getConfiguration();
}
diff --git a/src/applications/project/storage/PhabricatorProjectColumn.php b/src/applications/project/storage/PhabricatorProjectColumn.php
--- a/src/applications/project/storage/PhabricatorProjectColumn.php
+++ b/src/applications/project/storage/PhabricatorProjectColumn.php
@@ -33,6 +33,19 @@
self::CONFIG_SERIALIZATION => array(
'properties' => self::SERIALIZATION_JSON,
),
+ self::CONFIG_COLUMN_SCHEMA => array(
+ 'name' => 'text255',
+ 'status' => 'uint32',
+ 'sequence' => 'uint32',
+ ),
+ self::CONFIG_KEY_SCHEMA => array(
+ 'key_status' => array(
+ 'columns' => array('projectPHID', 'status', 'sequence'),
+ ),
+ 'key_sequence' => array(
+ 'columns' => array('projectPHID', 'sequence'),
+ ),
+ ),
) + parent::getConfiguration();
}
diff --git a/src/applications/project/storage/PhabricatorProjectColumnPosition.php b/src/applications/project/storage/PhabricatorProjectColumnPosition.php
--- a/src/applications/project/storage/PhabricatorProjectColumnPosition.php
+++ b/src/applications/project/storage/PhabricatorProjectColumnPosition.php
@@ -13,6 +13,21 @@
public function getConfiguration() {
return array(
self::CONFIG_TIMESTAMPS => false,
+ self::CONFIG_COLUMN_SCHEMA => array(
+ 'sequence' => 'uint32',
+ ),
+ self::CONFIG_KEY_SCHEMA => array(
+ 'boardPHID' => array(
+ 'columns' => array('boardPHID', 'columnPHID', 'objectPHID'),
+ 'unique' => true,
+ ),
+ 'objectPHID' => array(
+ 'columns' => array('objectPHID', 'boardPHID'),
+ ),
+ 'boardPHID_2' => array(
+ 'columns' => array('boardPHID', 'columnPHID', 'sequence'),
+ ),
+ ),
) + parent::getConfiguration();
}
diff --git a/src/applications/project/storage/PhabricatorProjectSchemaSpec.php b/src/applications/project/storage/PhabricatorProjectSchemaSpec.php
new file mode 100644
--- /dev/null
+++ b/src/applications/project/storage/PhabricatorProjectSchemaSpec.php
@@ -0,0 +1,48 @@
+<?php
+
+final class PhabricatorProjectSchemaSpec extends PhabricatorConfigSchemaSpec {
+
+ public function buildSchemata() {
+ $this->buildLiskSchemata('PhabricatorProjectDAO');
+
+ $this->buildEdgeSchemata(new PhabricatorProject());
+
+ $this->buildTransactionSchema(
+ new PhabricatorProjectTransaction());
+
+ $this->buildCustomFieldSchemata(
+ new PhabricatorProjectCustomFieldStorage(),
+ array(
+ new PhabricatorProjectCustomFieldNumericIndex(),
+ new PhabricatorProjectCustomFieldStringIndex(),
+ ));
+
+ $this->buildTransactionSchema(
+ new PhabricatorProjectColumnTransaction());
+
+ $this->buildRawSchema(
+ id(new PhabricatorProject())->getApplicationName(),
+ PhabricatorProject::TABLE_DATASOURCE_TOKEN,
+ array(
+ 'id' => 'id',
+ 'projectID' => 'id',
+ 'token' => 'text128',
+ ),
+ array(
+ 'PRIMARY' => array(
+ 'columns' => array('id'),
+ 'unique' => true,
+ ),
+ 'token' => array(
+ 'columns' => array('token', 'projectID'),
+ 'unique' => true,
+ ),
+ 'projectID' => array(
+ 'columns' => array('projectID'),
+ ),
+ ));
+
+
+ }
+
+}
diff --git a/src/applications/project/storage/PhabricatorProjectSlug.php b/src/applications/project/storage/PhabricatorProjectSlug.php
--- a/src/applications/project/storage/PhabricatorProjectSlug.php
+++ b/src/applications/project/storage/PhabricatorProjectSlug.php
@@ -5,4 +5,21 @@
protected $slug;
protected $projectPHID;
+ public function getConfiguration() {
+ return array(
+ self::CONFIG_COLUMN_SCHEMA => array(
+ 'slug' => 'text128',
+ ),
+ self::CONFIG_KEY_SCHEMA => array(
+ 'key_slug' => array(
+ 'columns' => array('slug'),
+ 'unique' => true,
+ ),
+ 'key_projectPHID' => array(
+ 'columns' => array('projectPHID'),
+ ),
+ ),
+ ) + parent::getConfiguration();
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 7:25 PM (19 h, 29 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6779389
Default Alt Text
D10581.diff (8 KB)
Attached To
Mode
D10581: Generate expected Project schemata
Attached
Detach File
Event Timeline
Log In to Comment