CRUD_ERD
Tables (7)
comments
- comment_id — INT — Primary key — NOT NULL — PK | NOT NULL
- post_id — INT — Foreign key → posts.post_id — NOT NULL — PK | NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL — PK | NOT NULL
- comment_content — TEXT — NOT NULL — NOT NULL
- created_at — DATETIME — NOT NULL — NOT NULL
- updated_at — DATETIME — NOT NULL — NOT NULL
dormant_users
- user_id — INT — Foreign key → users.user_id — NOT NULL — PK | NOT NULL
- dormanted_at — DATETIME — NOT NULL
post_files
- file_id — INT — Primary key — NOT NULL — PK | NOT NULL
- file_path — VARCHAR(500) — NOT NULL — NOT NULL
post_likes
- like_id — INT — Primary key — NOT NULL — PK | NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL — PK | NOT NULL
- post_id — INT — Foreign key → posts.post_id — NOT NULL — PK | NOT NULL
- created_at — DATETIME — NOT NULL
posts
- post_id — INT — Primary key — NOT NULL — PK | NOT NULL
- file_id — INT — Foreign key → post_files.file_id — NOT NULL — PK | NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL — PK | NOT NULL
- post_title — VARCHAR(255) — NOT NULL — NOT NULL
- post_content — TEXT — NOT NULL — NOT NULL
- hits — INT — NOT NULL — NOT NULL | DEFAULT 0
- created_at — DATETIME — NOT NULL — NOT NULL
- updated_at — DATETIME — NOT NULL — NOT NULL
profile_images
- profile_image_id — INT — Primary key — NOT NULL — PK | NOT NULL
- file_path — VARCHAR(500) — NOT NULL — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL — PK | NOT NULL
users
- user_id — INT — Primary key — NOT NULL — PK | NOT NULL
- email — INT — NOT NULL — NOT NULL | UNIQUE
- password — VARCHAR(255) — NOT NULL — NOT NULL
- nickname — VARCHAR(255) — NOT NULL — NOT NULL | UNIQUE
- created_at — DATETIME — NOT NULL — NOT NULL
- updated_at — DATETIME — NOT NULL