1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-15 18:10:53 +01:00
phorge-phorge/resources/sql/autopatches/20140805.boardcol.1.sql
epriestley 09868271bd Move board relationships to dedicated storage
Summary:
Fixes T5476. Using edges to store which objects are on which board columns ends up being pretty awkward. In particular, it makes T4807 very difficult to implement.

Introduce a dedicated `BoardColumnPosition` storage.

This doesn't affect ordering rules (T4807) yet: boards are still arranged by priority. We just read which tasks are on which columns out of a new table.

Test Plan:
  - Migrated data, then viewed some boards. Saw exactly the same data.
  - Dragged tasks from column to column.
  - Created a task directly into a column.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5476

Differential Revision: https://secure.phabricator.com/D10160
2014-08-06 15:09:09 -07:00

10 lines
466 B
SQL

CREATE TABLE {$NAMESPACE}_project.project_columnposition (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
boardPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
columnPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
objectPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
sequence INT UNSIGNED NOT NULL,
UNIQUE KEY (boardPHID, columnPHID, objectPHID),
KEY (objectPHID, boardPHID),
KEY (boardPHID, columnPHID, sequence)
) ENGINE=InnoDB, COLLATE utf8_general_ci;