(data): Update version and migration.
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
CONFIG_FILE = "config/bot.conf"
|
CONFIG_FILE = "config/bot.conf"
|
||||||
DATA_VERSION = 5
|
DATA_VERSION = 6
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
DROP TYPE IF EXISTS SessionChannelType CASCADE;
|
-- DROP TYPE IF EXISTS SessionChannelType CASCADE;
|
||||||
DROP TABLE IF EXISTS session_history CASCADE;
|
-- DROP TABLE IF EXISTS session_history CASCADE;
|
||||||
DROP TABLE IF EXISTS current_sessions CASCADE;
|
-- DROP TABLE IF EXISTS current_sessions CASCADE;
|
||||||
DROP FUNCTION IF EXISTS close_study_session;
|
-- DROP FUNCTION IF EXISTS close_study_session(_guildid BIGINT, _userid BIGINT);
|
||||||
|
-- DROP FUNCTION IF EXISTS study_time_since(_guildid BIGINT, _userid BIGINT, _timestamp TIMESTAMPTZ)
|
||||||
|
|
||||||
|
-- DROP VIEW IF EXISTS current_sessions_totals CASCADE;
|
||||||
|
|
||||||
DROP VIEW IF EXISTS current_sessions_totals CASCADE;
|
|
||||||
DROP VIEW IF EXISTS member_totals CASCADE;
|
DROP VIEW IF EXISTS member_totals CASCADE;
|
||||||
DROP VIEW IF EXISTS member_ranks CASCADE;
|
DROP VIEW IF EXISTS member_ranks CASCADE;
|
||||||
DROP VIEW IF EXISTS current_study_badges CASCADE;
|
DROP VIEW IF EXISTS current_study_badges CASCADE;
|
||||||
DROP VIEW IF EXISTS new_study_badges CASCADE;
|
DROP VIEW IF EXISTS new_study_badges CASCADE;
|
||||||
|
|
||||||
DROP FUNCTION IF EXISTS study_time_since;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TYPE SessionChannelType AS ENUM (
|
CREATE TYPE SessionChannelType AS ENUM (
|
||||||
'STANDARD',
|
'STANDARD',
|
||||||
@@ -176,3 +176,5 @@ AS $$
|
|||||||
$$ LANGUAGE PLPGSQL;
|
$$ LANGUAGE PLPGSQL;
|
||||||
|
|
||||||
ALTER TABLE guild_config ADD COLUMN daily_study_cap INTEGER;
|
ALTER TABLE guild_config ADD COLUMN daily_study_cap INTEGER;
|
||||||
|
|
||||||
|
INSERT INTO VersionHistory (version, author) VALUES (6, 'v5-v6 Migration');
|
||||||
|
|||||||
@@ -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 (5, 'Initial Creation');
|
INSERT INTO VersionHistory (version, author) VALUES (6, 'Initial Creation');
|
||||||
|
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION update_timestamp_column()
|
CREATE OR REPLACE FUNCTION update_timestamp_column()
|
||||||
|
|||||||
Reference in New Issue
Block a user