add blogpost and cdn chall

This commit is contained in:
Jonathan
2025-10-10 22:34:43 +07:00
parent ea02892f14
commit 2d51b73a1e
47 changed files with 1904 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
PRAGMA foreign_keys = ON;
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
role TEXT NOT NULL DEFAULT 'user'
);
CREATE TABLE posts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
content TEXT,
image_filename TEXT,
metadata TEXT,
author_id INTEGER,
FOREIGN KEY(author_id) REFERENCES users(id)
);