The database requirements have been added, as well as the service/repo architecture. A few small functions have been created, but the system is not complete by any means. More work is required to mark this task complete.
17 lines
468 B
PL/PgSQL
17 lines
468 B
PL/PgSQL
-- Author: Hayden Hargreaves (hhargreaves2006@gmail.com)
|
|
-- Desc: Create the user engagement table.
|
|
-- Date: 07/13/2025
|
|
|
|
BEGIN;
|
|
|
|
CREATE TABLE IF NOT EXISTS Engagements (
|
|
Id SERIAL PRIMARY KEY NOT NULL,
|
|
Type E_ENGAGEMENT NOT NULL,
|
|
Message TEXT,
|
|
Entity INT, -- Used to map to other DB objects, recipes, users, etc...
|
|
UserId INTEGER REFERENCES users(id), -- Can be null, when users aren't logged in
|
|
Created TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
);
|
|
|
|
COMMIT;
|