Created
September 5, 2018 13:55
-
-
Save AndrewGreen/1acf36b76eab53f01566c689ab2e4169 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use pgehres; | |
RENAME TABLE squidlog TO files; | |
ALTER TABLE files | |
ADD COLUMN directory VARCHAR(256) NOT NULL, | |
ADD COLUMN sample_rate INT(2) UNSIGNED DEFAULT NULL, | |
ADD COLUMN status ENUM('processing', 'consumed') NOT NULL, | |
ADD COLUMN consumed_events INT UNSIGNED DEFAULT NULL, | |
ADD COLUMN ignored_events INT UNSIGNED DEFAULT NULL, | |
ADD COLUMN invalid_events INT UNSIGNED DEFAULT NULL, | |
ADD INDEX timestamp_index (timestamp), | |
ADD INDEX status_index (status); | |
ALTER TABLE bannerimpressions | |
ADD COLUMN file_id INT(11) UNSIGNED NOT NULL, | |
ADD INDEX file_id_index (file_id); | |
ALTER TABLE landingpageimpression_raw | |
ADD COLUMN file_id INT(11) UNSIGNED NOT NULL, | |
ADD INDEX file_id_index (file_id); | |
ALTER TABLE donatewiki_unique | |
ADD COLUMN file_id INT(11) UNSIGNED NOT NULL, | |
ADD INDEX file_id_index (file_id); | |
CREATE VIEW squidlog AS SELECT id, filename, impressiontype, timestamp FROM files; | |
-- TODO: Fix permissions as necessary |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment