added more db stuff, NOT WORKING

This commit is contained in:
2024-03-30 02:52:46 +02:00
parent c35de0642e
commit 4bd3425b1b
17 changed files with 547 additions and 8 deletions

View File

11
migrations/posts/up.sql Normal file
View File

@@ -0,0 +1,11 @@
CREATE TABLE IF NOT EXISTS Posts (
id UUID NOT NULL UNIQUE,
title TEXT NOT NULL,
descr TEXT NOT NULL,
img_url TEXT NOT NULL,
origin_url TEXT NOT NULL,
original_request JSON NOT NULL,
posted_on TIMESTAMP NOT NULL
PRIMARY KEY (id)
)

View File

7
migrations/tokens/up.sql Normal file
View File

@@ -0,0 +1,7 @@
CREATE TABLE IF NOT EXISTS Tokens (
token TEXT NOT NULL UNIQUE,
owner_id UUID NOT NULL,
permissions BIGINT NOT NULL,
PRIMARY KEY (token)
)

View File

@@ -1,4 +1,4 @@
-- Your SQL goes here
CREATE TABLE IF NOT EXISTS Users (
id UUID NOT NULL UNIQUE,
email TEXT NOT NULL,