Allow owners paths to be arbitrarily long and add storage for display paths
Summary: Depends on D19182. Ref T11015. This changes `path` from `text255` to `longtext` because paths may be arbitrarily long. It adds `pathDisplay` to prepare for display paths and storage paths having different values. For now, `pathDisplay` is copied from `path` and always has the same value. Test Plan: - Ran migration, checked database for sanity (all `pathDisplay` and `path` values identical). - Added new paths, saw `pathDisplay` and `path` get the same values. - Added an unreasonably enormous path with far more than 255 characters. Maniphest Tasks: T11015 Differential Revision: https://secure.phabricator.com/D19183
This commit is contained in:
2
resources/sql/autopatches/20180306.opath.05.longpath.sql
Normal file
2
resources/sql/autopatches/20180306.opath.05.longpath.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE {$NAMESPACE}_owners.owners_path
|
||||
CHANGE path path LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT};
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE {$NAMESPACE}_owners.owners_path
|
||||
ADD pathDisplay LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT};
|
||||
@@ -0,0 +1,2 @@
|
||||
UPDATE {$NAMESPACE}_owners.owners_path
|
||||
SET pathDisplay = path WHERE pathDisplay = '';
|
||||
Reference in New Issue
Block a user