Files
timetracker-hs/Application/Schema.sql
2022-09-02 22:40:21 +02:00

15 lines
544 B
SQL

-- Your database schema. Use the Schema Designer at http://localhost:8001/ to add some tables.
CREATE TABLE entries (
id UUID DEFAULT uuid_generate_v4() PRIMARY KEY NOT NULL,
started TIMESTAMP WITH TIME ZONE DEFAULT date_trunc(('minute'::TEXT), now()) NOT NULL,
till TIMESTAMP WITH TIME ZONE,
"day" INT DEFAULT day_epoch(now()) NOT NULL,
"comment" TEXT DEFAULT NULL,
isfree BOOLEAN DEFAULT false NOT NULL
);
CREATE TABLE weekly_worktimes (
"month" INT NOT NULL,
"year" INT NOT NULL,
worktime INT NOT NULL
);