교육단 ERD 테스트 SNS
테이블 (5)
comments
- comments_id (id) — UUID — 기본 키
- content — TEXT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- users_id (id2) — UUID — 외래 키 → users.users_id
- post_id (id3) — UUID — 외래 키 → posts.post_id
follows
- follows_id (id) — UUID — 기본 키
- follower_id — UUID — NOT NULL
- following_id — UUID — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- CHECK — (follower_id != following_id)
- users_id (id2) — UUID — 외래 키 → users.users_id
likes
- likes_id (id) — UUID — 기본 키
- created_at — TIMESTAMP — NOT NULL
- users_id (id2) — UUID — 외래 키 → users.users_id
- post_id (id3) — UUID — 외래 키 → posts.post_id
- users_id (id4) — UUID — 외래 키 → users.users_id
posts
- post_id (id) — UUID — 기본 키
- image_url — TEXT — NOT NULL
- caption — TEXT
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- users_id (id2) — UUID — 외래 키 → users.users_id
users
- users_id (id) — UUID — 기본 키
- clerk_id — TEXT — NOT NULL
- name — TEXT — NOT NULL
- created_at — TIMESTAMP — NOT NULL