rev blogpost

This commit is contained in:
Jonathan
2025-10-11 12:42:26 +07:00
parent 6c5b9cfc24
commit 3857f0bdc0
36 changed files with 398 additions and 43 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)
);