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

28 lines
767 B
MySQL
Raw Normal View History

CREATE TABLE phabricator_user.user_log (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
actorPHID varchar(64) BINARY,
key(actorPHID, dateCreated),
userPHID varchar(64) BINARY NOT NULL,
key(userPHID, dateCreated),
action varchar(64) NOT NULL,
key(action, dateCreated),
oldValue LONGBLOB NOT NULL,
newValue LONGBLOB NOT NULL,
details LONGBLOB NOT NULL,
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL,
key(dateCreated)
);
ALTER TABLE phabricator_user.user_log
ADD remoteAddr varchar(16) NOT NULL;
ALTER TABLE phabricator_user.user_log
ADD KEY (remoteAddr, dateCreated);
ALTER TABLE phabricator_user.user_log
ADD session varchar(40);
ALTER TABLE phabricator_user.user_log
ADD KEY (session, dateCreated);