tsk-44: Record when message was sent (#48)
Closes #44 Reviewed-on: phoenix/textsender-api#48 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
+13
-1
@@ -1,6 +1,10 @@
|
||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
||||
|
||||
DROP TABLE IF EXISTS contacts CASCADE;
|
||||
DROP TABLE IF EXISTS messages CASCADE;
|
||||
DROP TABLE IF EXISTS scheduled_messages CASCADE;
|
||||
DROP TABLE IF EXISTS scheduled_message_events CASCADE;
|
||||
DROP TABLE IF EXISTS message_event_responses CASCADE;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS contacts (
|
||||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
@@ -28,4 +32,12 @@ CREATE TABLE IF NOT EXISTS scheduled_message_events (
|
||||
message_id UUID NOT NULL,
|
||||
scheduled_message_id UUID NOT NULL,
|
||||
created timestamptz DEFAULT now()
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS message_event_responses (
|
||||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
scheduled_message_event_id UUID NOT NULL,
|
||||
response JSONB NOT NULL,
|
||||
user_id UUID NOT NULL,
|
||||
sent timestamptz NOT NULL
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user