ktb
Tables (5)
Untitled (users)
- Key (id) — int unsigned — Primary key — NOT NULL
- Field (email) — varchar(320) — NOT NULL — unique
- 암호화된 비밀번호 (password_hash) — varchar(60) — NOT NULL — bcrypt로 암호화된 값
- Field (profile_image) — varbinary(1024)
- Field (nickname) — varchar(10) — NOT NULL — unique
- Field (created_at) — timestamp — NOT NULL
- Field (updated_at) — timestamp — NOT NULL
Untitled (posts)
- Key (id) — int unsigned — Primary key — NOT NULL
- 작성자 id (author_id) — int unsigned — Foreign key → Untitled.Key — NOT NULL
- 이미지 (image) — varbinary(1024)
- Field (title) — varchar(26) — NOT NULL
- Field (content) — text — NOT NULL
- Field (view_count) — int unsigned — NOT NULL
- Field (created_at) — timestamp — NOT NULL
- Field (updated_at) — timestamp — NOT NULL
Untitled (comments)
- Key (id) — int unsigned — Primary key — NOT NULL
- Key (author_id) — int unsigned — Foreign key → Untitled.Key — NOT NULL
- Key (post_id) — int unsigned — Foreign key → Untitled.Key — NOT NULL
- Field (content) — varchar(500) — NOT NULL
- Field (created_at) — timestamp — NOT NULL
- Field (updated_at) — timestamp — NOT NULL
Untitled (likes)
- Key (post_id) — int unsigned — Foreign key → Untitled.Key — NOT NULL — primary key (user_id, post_id)
- Key (user_id) — int unsigned — Foreign key → Untitled.Key — NOT NULL — primary key (user_id, post_id)
- Field (created_at) — timestamp — NOT NULL
- Field (updated_at) — timestamp — NOT NULL
Untitled (files)
- Key (file_key) — varbinary(1024) — Primary key — NOT NULL
- Key (uploader_id) — int unsigned — Foreign key → Untitled.Key — NOT NULL
- Field (created_at) — timestamp — NOT NULL
- Field (updated_at) — timestamp — NOT NULL