1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 10:42:41 +01:00
phorge-phorge/resources/sql/patches/20130701.conduitlog.sql
epriestley c3b2184977 Mostly modernize Conduit logs
Summary:
  - Add GC support to conduit logs.
  - Add Query support to conduit logs.
  - Record the actual user PHID.
  - Show client name.
  - Support querying by specific method, so I can link to this from a setup issue.

@wez, this migration may not be fast. It took about 8 seconds for me to migrate 800,000 rows in the `conduit_methodcalllog` table. This adds a GC which should keep the table at a more manageable size in the future.

You can safely delete all data older than 30 days from this table, although you should do it by `id` instead of `dateCreated` since there's no key on `dateCreated` until this patch.

Test Plan:
  - Ran GC.
  - Looked at log UI.
  - Ran Conduit methods.

Reviewers: btrahan

Reviewed By: btrahan

CC: wez, aran

Differential Revision: https://secure.phabricator.com/D6332
2013-07-01 12:37:34 -07:00

14 lines
471 B
SQL

ALTER TABLE {$NAMESPACE}_conduit.conduit_methodcalllog
ADD callerPHID VARCHAR(64);
ALTER TABLE {$NAMESPACE}_conduit.conduit_methodcalllog
ADD KEY `key_created` (dateCreated);
ALTER TABLE {$NAMESPACE}_conduit.conduit_methodcalllog
ADD KEY `key_method` (method);
ALTER TABLE {$NAMESPACE}_conduit.conduit_methodcalllog
ADD KEY `key_callermethod` (callerPHID, method);
ALTER TABLE {$NAMESPACE}_conduit.conduit_connectionlog
ADD KEY `key_created` (dateCreated);