1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 17:30:59 +01:00

Added initial storage structure for Phrequent.

Summary:
Added the initial storage structure (DB tables and DAO classes)
for Phrequent.

Test Plan:
Apply the patch and run `bin/storage upgrade`.  It should
complete successfully.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2857

Differential Revision: https://secure.phabricator.com/D5476
This commit is contained in:
James Rhodes 2013-03-29 21:30:15 -07:00 committed by epriestley
parent c29dbf8189
commit dd3b3bdd5e
4 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,10 @@
CREATE TABLE {$NAMESPACE}_phrequent.phrequent_usertime (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
userPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
objectPHID VARCHAR(64) NULL COLLATE utf8_bin,
note LONGTEXT NULL COLLATE utf8_bin,
dateStarted INT UNSIGNED NOT NULL,
dateEnded INT UNSIGNED NULL,
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View file

@ -0,0 +1,12 @@
<?php
/**
* @group phrequent
*/
abstract class PhrequentDAO extends PhabricatorLiskDAO {
public function getApplicationName() {
return 'phrequent';
}
}

View file

@ -0,0 +1,14 @@
<?php
/**
* @group phrequent
*/
final class PhrequentUserTime extends PhrequentDAO {
protected $userPHID;
protected $objectPHID;
protected $note;
protected $dateStarted;
protected $dateEnded;
}

View file

@ -183,6 +183,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList {
'type' => 'db', 'type' => 'db',
'name' => 'phortune', 'name' => 'phortune',
), ),
'db.phrequent' => array(
'type' => 'db',
'name' => 'phrequent',
),
'0000.legacy.sql' => array( '0000.legacy.sql' => array(
'type' => 'sql', 'type' => 'sql',
'name' => $this->getPatchPath('0000.legacy.sql'), 'name' => $this->getPatchPath('0000.legacy.sql'),
@ -1214,6 +1218,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList {
'type' => 'sql', 'type' => 'sql',
'name' => $this->getPatchPath('20130324.phortuneproduct.sql'), 'name' => $this->getPatchPath('20130324.phortuneproduct.sql'),
), ),
'20130330.phrequent.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130330.phrequent.sql'),
),
); );
} }