week4

Tables (4)

accounts (Untitled2)

  • user_id (사용자아이디) — Auto — Primary key — NOT NULL
  • name (사용자명) — Char
  • email (이메일) — Char

comments (Untitled3)

  • comment_id (댓글아이디) — Auto — Primary key — NOT NULL
  • user_id (사용자아이디) — Auto — Foreign key → posts.user_id — NOT NULL
  • post_id (게시글아이디) — Auto — Foreign key → posts.post_id — NOT NULL
  • commenter (댓글작성자) — Char
  • comment (댓글내용) — Text
  • created_at (작성일시) — DateTime
  • updated_at (수정일시) — DateTime

hashtag (Untitled4)

  • tag (해시태그) — Char — Primary key — NOT NULL
  • post_id (게시글아이디) — Auto — Foreign key → posts.post_id — NOT NULL

posts (Untitled)

  • post_id (게시글아이디) — Auto — Primary key — NOT NULL
  • user_id (사용자아이디) — Auto — Foreign key → accounts.user_id — NOT NULL
  • title (제목) — Char
  • content (내용) — Text
  • writer (작성자) — Char
  • category — Char
  • created_at (작성일시) — DateTime
  • updated_at (수정일시) — DateTime
  • tag (해시태그) — Char — Foreign key → hashtag.tag — NOT NULL