refractor blogpost and cdn chall

This commit is contained in:
Jonathan
2025-10-10 22:37:11 +07:00
parent 2d51b73a1e
commit bb3f6e74aa
47 changed files with 0 additions and 544 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)
);