pushing for testing on vps
This commit is contained in:
2
migrations/20240330145459_users.down.sql
Normal file
2
migrations/20240330145459_users.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add down migration script here
|
||||
DROP TABLE users;
|
||||
@@ -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,
|
||||
2
migrations/20240330145503_tokens.down.sql
Normal file
2
migrations/20240330145503_tokens.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add down migration script here
|
||||
DROP TABLE tokens;
|
||||
@@ -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)
|
||||
)
|
||||
)
|
||||
2
migrations/20240330145505_posts.down.sql
Normal file
2
migrations/20240330145505_posts.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add down migration script here
|
||||
DROP TABLE posts;
|
||||
@@ -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)
|
||||
)
|
||||
@@ -1,2 +0,0 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
DROP TABLE Users
|
||||
Reference in New Issue
Block a user