This repository has been archived on 2024-10-20. You can view files and clone it, but cannot push or open issues or pull requests.
burgercat/schema.sql

34 lines
827 B
MySQL
Raw Normal View History

2023-07-08 17:00:32 +01:00
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS posts;
DROP TABLE IF EXISTS comments;
DROP TABLE IF EXISTS sessions;
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created TEXT NOT NULL,
username TEXT NOT NULL,
password TEXT NOT NULL,
banned TEXT NOT NULL DEFAULT 0,
administrator INTEGER NOT NULL DEFAULT 0
);
CREATE TABLE posts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created TEXT NOT NULL,
creator TEXT NOT NULL,
imageurl TEXT NOT NULL,
textstr TEXT NOT NULL
);
CREATE TABLE comments (
id INTEGER PRIMARY KEY AUTOINCREMENT,
post_id INTEGER NOT NULL,
created TEXT NOT NULL,
creator TEXT NOT NULL,
textstr TEXT NOT NULL
);
CREATE TABLE sessions (
session TEXT PRIMARY KEY NOT NULL,
id INTEGER NOT NULL
2023-06-29 19:21:18 +01:00
);