Add the rest
All checks were successful
test and deploy / test (3.11.5) (push) Successful in 1m23s
test and deploy / push-and-build (push) Successful in 59s
Test Helper Module / test (3.11.5) (push) Successful in 1m28s

This commit is contained in:
2025-10-16 14:04:02 -06:00
parent ab860b8cab
commit 3032210a85
18 changed files with 2319 additions and 0 deletions

17
src/sql/current-table.sql Normal file
View File

@@ -0,0 +1,17 @@
-- Table: public.callouts
-- DROP TABLE IF EXISTS public.callouts;
CREATE TABLE IF NOT EXISTS public.callouts
(
user_id bigint NOT NULL,
date date NOT NULL,
reason text COLLATE pg_catalog."default",
nickname text COLLATE pg_catalog."default",
CONSTRAINT callouts_pkey PRIMARY KEY (user_id, date)
)
TABLESPACE pg_default;
ALTER TABLE IF EXISTS public.callouts
OWNER to opossumbot;

View File

@@ -0,0 +1,7 @@
create table absent_players (
user_id int NOT NULL,
user_name varchar(20) NOT NULL,
date_ab date NOT NULL,
reason_ab varchar(200),
has_passed int DEFAULT 0);
/

13
src/sql/sqlscripts.sql Normal file
View File

@@ -0,0 +1,13 @@
-- These are scripts that are formatted for accesing the table, more comments can be provided as needed
select count(user_id) from absent_players where user_id = 000000 and has_passed = 1;
-- Select the number of times a user has been absent so far(replace user_ID)
select user_name, reason_ab from absent_players where date_ab = SYSDATE;
-- select users name, reason they're absent today (reoplace date with today's date)
select user_name, date_ab, reason_ab from absent_players where has_passed = 0;
-- selects all future players who are absent, the reason they are, and when they are.
delete from absent_players where user_ID = 00000 and date_ab = date and has_passed = 0;
-- deletes a future absence from the table, cannot remove older absences.