(data): Update version and index.

This commit is contained in:
2022-01-19 14:19:38 +02:00
parent 0948f29e76
commit 7fad03ecd9
2 changed files with 4 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS topgg(
userid BIGINT NOT NULL, userid BIGINT NOT NULL,
boostedTimestamp TIMESTAMPTZ NOT NULL boostedTimestamp TIMESTAMPTZ NOT NULL
); );
CREATE INDEX topgg_member ON topgg (userid); CREATE INDEX topgg_userid_timestamp ON topgg (userid, boostedTimestamp);
-- }}} -- }}}
DROP FUNCTION close_study_session(_guildid BIGINT, _userid BIGINT); DROP FUNCTION close_study_session(_guildid BIGINT, _userid BIGINT);
@@ -73,4 +73,4 @@ AS $$
$$ LANGUAGE PLPGSQL; $$ LANGUAGE PLPGSQL;
-- }}} -- }}}
INSERT INTO VersionHistory (version, author) VALUES (8, 'v8-v9 migration'); INSERT INTO VersionHistory (version, author) VALUES (9, 'v8-v9 migration');

View File

@@ -4,7 +4,7 @@ CREATE TABLE VersionHistory(
time TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL, time TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
author TEXT author TEXT
); );
INSERT INTO VersionHistory (version, author) VALUES (8, 'Initial Creation'); INSERT INTO VersionHistory (version, author) VALUES (9, 'Initial Creation');
CREATE OR REPLACE FUNCTION update_timestamp_column() CREATE OR REPLACE FUNCTION update_timestamp_column()
@@ -794,7 +794,7 @@ create TABLE topgg(
userid BIGINT NOT NULL, userid BIGINT NOT NULL,
boostedTimestamp TIMESTAMPTZ NOT NULL boostedTimestamp TIMESTAMPTZ NOT NULL
); );
CREATE INDEX topgg_member ON topgg (userid); CREATE INDEX topgg_userid_timestamp ON topgg (userid, boostedTimestamp);
-- }}} -- }}}
-- vim: set fdm=marker: -- vim: set fdm=marker: