pushing for testing on vps

This commit is contained in:
2024-03-30 17:06:34 +02:00
parent 4bd3425b1b
commit cdcc9764ae
27 changed files with 966 additions and 67 deletions

View File

@@ -0,0 +1,2 @@
-- Add down migration script here
DROP TABLE users;

View File

@@ -1,5 +1,5 @@
CREATE TABLE IF NOT EXISTS Users (
-- Add up migration script here
CREATE TABLE IF NOT EXISTS users (
id UUID NOT NULL UNIQUE,
email TEXT NOT NULL,
username TEXT NOT NULL,

View File

@@ -0,0 +1,2 @@
-- Add down migration script here
DROP TABLE tokens;

View File

@@ -1,7 +1,7 @@
CREATE TABLE IF NOT EXISTS Tokens (
-- Add up migration script here
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

@@ -0,0 +1,2 @@
-- Add down migration script here
DROP TABLE posts;

View File

@@ -1,11 +1,11 @@
CREATE TABLE IF NOT EXISTS Posts (
-- Add up migration script here
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
posted_on TIMESTAMP NOT NULL,
PRIMARY KEY (id)
)

View File

@@ -1,2 +0,0 @@
-- This file should undo anything in `up.sql`
DROP TABLE Users