Add player profiles and community settings
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
20
backend/migrations/016_community_settings_and_stats.sql
Normal file
20
backend/migrations/016_community_settings_and_stats.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
-- +mixmaker Up
|
||||
CREATE TABLE community_settings (
|
||||
singleton boolean PRIMARY KEY DEFAULT true CHECK (singleton),
|
||||
discord_invite_url text NOT NULL DEFAULT '',
|
||||
updated_at timestamptz NOT NULL DEFAULT now(),
|
||||
updated_by text REFERENCES accounts(id)
|
||||
);
|
||||
|
||||
INSERT INTO community_settings(singleton) VALUES (true)
|
||||
ON CONFLICT(singleton) DO NOTHING;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS series_event_id_idx
|
||||
ON series ((body->>'eventId'));
|
||||
CREATE INDEX IF NOT EXISTS events_completed_starts_at_idx
|
||||
ON events (starts_at DESC) WHERE state = 'Completed';
|
||||
|
||||
-- +mixmaker Down
|
||||
DROP INDEX IF EXISTS events_completed_starts_at_idx;
|
||||
DROP INDEX IF EXISTS series_event_id_idx;
|
||||
DROP TABLE IF EXISTS community_settings;
|
||||
Reference in New Issue
Block a user