bbs
Tables (4)
Comments (comments)
- id — INT — Primary key — NOT NULL — AUTO_INCREMENT
- username — VARCHAR(15)
- content — VARCHAR(100)
- created_at — TIMESTAMP
- post_id — INT — Foreign key → Posts.id — NOT NULL — ON DELETE CASECADE
- user_id — VARCHAR(50) — NOT NULL
Images (images)
- post_id — INT — Primary key — NOT NULL
- filename — VARCHAR(200) — Primary key — NOT NULL
- id (id2) — INT — Foreign key → Posts.id — NOT NULL
Posts (posts)
- id — INT — Primary key — NOT NULL
- views — INT — AUTO_INCREMENT
- username — VARCHAR(15)
- content — VARCHAR(5000) — NOT NULL
- created_at — TIMESTAMP
- title — VARCHAR(50)
- user_id — VARCHAR(50) — NOT NULL
Users (users)
- id — VARCHAR(50) — Primary key — NOT NULL
- join_date — TIMESTAMP
- username — VARCHAR(15) — UNIQUE
- Password (password) — VARCHAR(20)
- email — VARCHAR(50) — UNIQUE
- money — INT