Files
hyperfocus-plugin/data/hyperfocus.sql
2025-11-01 06:38:12 +10:00

14 lines
451 B
PL/PgSQL

BEGIN;
INSERT INTO version_history (component, from_version, to_version, author)
VALUES ('HYPERFOCUS', 0, 1, 'Initial Creation');
CREATE TABLE hyperfocused(
profileid INTEGER PRIMARY KEY REFERENCES user_profiles(profileid) ON DELETE CASCADE ON UPDATE CASCADE,
started_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
ends_at TIMESTAMPTZ NOT NULL,
started_in INTEGER REFERENCES communities(communityid) ON DELETE SET NULL ON UPDATE CASCADE
);
COMMIT;