1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00
phorge-phorge/resources/sql/autopatches/20180430.repo_identity.sql
Austin McKinley cd84e53c44 Begin building out RepositoryIdentity indirection layer
Summary: Ref T12164. Start building initial objects for managing `RepositoryIdentity` objects. This won't land until much more of the infrastructure is in place.

Test Plan: Ran `bin/storage upgrade` and observed expected table.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T12164

Differential Revision: https://secure.phabricator.com/D19423
2018-05-31 07:01:16 -07:00

14 lines
677 B
SQL

CREATE TABLE {$NAMESPACE}_repository.repository_identity (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
phid VARBINARY(64) NOT NULL,
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL,
automaticGuessedUserPHID VARBINARY(64) DEFAULT NULL,
manuallySetUserPHID VARBINARY(64) DEFAULT NULL,
currentEffectiveUserPHID VARBINARY(64) DEFAULT NULL,
identityNameHash BINARY(12) NOT NULL,
identityNameRaw LONGBLOB NOT NULL,
identityNameEncoding VARCHAR(16) DEFAULT NULL COLLATE {$COLLATE_TEXT},
UNIQUE KEY `key_phid` (phid),
UNIQUE KEY `key_identity` (identityNameHash)
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};