#7 - saving feed, but without content

This commit is contained in:
2025-03-11 13:57:16 +02:00
parent 5a7fac748b
commit e89bfba392
6 changed files with 140 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
-- name: CreateFeed :one
INSERT INTO feeds (id, created_at, updated_at, user_id, url, name)
VALUES (
$1,
$2,
$3,
$4,
$5,
$6
)
RETURNING *;

12
sql/schema/0002_feed.sql Normal file
View File

@@ -0,0 +1,12 @@
-- +goose Up
CREATE TABLE feeds(
id UUID PRIMARY KEY,
created_at TIMESTAMP not null DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP not null,
name VARCHAR(128) not null,
url VARCHAR(512) not null UNIQUE,
user_id UUID not null REFERENCES users(id) ON DELETE CASCADE
);
-- +goose Down
DROP TABLE feeds;