From 276b1fdd41de087a6700a1578e71dd8ccf83fee6 Mon Sep 17 00:00:00 2001
From: Xe Iaso <me@xeiaso.net>
Date: Sat, 17 Jun 2023 19:59:20 -0400
Subject: cmd/marabot: upload shit to S3

Signed-off-by: Xe Iaso <me@xeiaso.net>
---
 cmd/marabot/schema.sql | 57 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 56 insertions(+), 1 deletion(-)

(limited to 'cmd/marabot/schema.sql')

diff --git a/cmd/marabot/schema.sql b/cmd/marabot/schema.sql
index 05a7f56..f38537f 100644
--- a/cmd/marabot/schema.sql
+++ b/cmd/marabot/schema.sql
@@ -78,6 +78,13 @@ CREATE TABLE IF NOT EXISTS irc_messages (
     tags TEXT NOT NULL
 );
 
+CREATE TABLE IF NOT EXISTS revolt_channels (
+    id TEXT PRIMARY KEY,
+    server_id TEXT NOT NULL,
+    name TEXT NOT NULL,
+    description TEXT NOT NULL
+);
+
 CREATE TABLE IF NOT EXISTS revolt_emoji (
     id TEXT PRIMARY KEY,
     server_id TEXT NOT NULL,
@@ -89,4 +96,52 @@ CREATE TABLE IF NOT EXISTS revolt_discord_emoji (
     revolt_id TEXT NOT NULL,
     discord_id TEXT NOT NULL,
     name TEXT NOT NULL
-);
\ No newline at end of file
+);
+
+CREATE TABLE IF NOT EXISTS revolt_messages (
+    id TEXT PRIMARY KEY,
+    channel_id TEXT NOT NULL,
+    author_id TEXT NOT NULL,
+    content TEXT NOT NULL,
+    created_at TEXT NOT NULL
+);
+
+CREATE TABLE IF NOT EXISTS revolt_message_masquerade (
+    id TEXT PRIMARY KEY,
+    username TEXT NOT NULL,
+    avatar_url TEXT NOT NULL
+);
+
+CREATE TABLE IF NOT EXISTS revolt_servers (
+    id TEXT PRIMARY KEY,
+    name TEXT NOT NULL,
+    description TEXT NOT NULL
+);
+
+CREATE TABLE IF NOT EXISTS revolt_users (
+    id TEXT PRIMARY KEY,
+    username TEXT NOT NULL,
+    avatar_url TEXT NOT NULL,
+    created_at TEXT NOT NULL
+);
+
+CREATE TABLE IF NOT EXISTS revolt_attachments (
+    id TEXT PRIMARY KEY,
+    tag TEXT NOT NULL,
+    message_id TEXT,
+    url TEXT NOT NULL,
+    filename TEXT NOT NULL,
+    content_type TEXT NOT NULL,
+    width INTEGER,
+    height INTEGER,
+    "size" INTEGER NOT NULL
+);
+
+CREATE TABLE IF NOT EXISTS s3_uploads (
+    id TEXT PRIMARY KEY, -- sha512 of file contents
+    url TEXT NOT NULL,
+    kind TEXT NOT NULL,
+    content_type TEXT NOT NULL,
+    created_at TEXT NOT NULL,
+    message_id TEXT
+);
-- 
cgit v1.2.3

