KTB_practice

Tables (6)

Untitled (Users)

  • Key (user_id) — INT — Primary key — NOT NULL
  • Field (email) — VARCHAR — NOT NULL
  • Field2 (password) — VARCHAR — NOT NULL
  • Field3 (nickname) — VARCHAR — NOT NULL
  • Field4 (profile_image) — VARCHAR — NOT NULL
  • Field5 (created_at) — DATETIME — NOT NULL

Untitled (Posts)

  • Key (post_id) — BIGINT — Primary key — NOT NULL
  • Field (title) — VARCHAR — NOT NULL
  • Field2 (content) — LONGTEXT — NOT NULL
  • Field3 (created_at) — DATETIME — NOT NULL
  • Field4 (updated_at) — DATETIME
  • Field5 (timestamp) — TIMESTAMP — NOT NULL
  • Key (user_id) — LONG — Foreign key → Untitled.Key — NOT NULL
  • Field4 (include_image) — BOOLEAN

Untitled (Posts_images)

  • Key (image_id) — INT — Primary key — NOT NULL
  • Field (image_url) — VARCHAR — NOT NULL
  • Key (post_id) — INT — Foreign key → Untitled.Key — NOT NULL

Untitled (Replies)

  • Key (reply_id) — BIGINT — Primary key — NOT NULL
  • Field (content) — TEXT — NOT NULL
  • Field2 (created_at) — DATETIME — NOT NULL
  • Field3 (updated_at) — DATETIME
  • Field4 (timestamp) — TIMESTAMP — NOT NULL
  • Key (user_id) — INT — Foreign key → Untitled.Key — NOT NULL
  • Key (post_id) — INT — Foreign key → Untitled.Key — NOT NULL

Untitled (Posts_counts)

  • Key (post_id) — BIGINT — Foreign key → Untitled.Key — NOT NULL
  • Field (like_count) — INT
  • Field (reply_count) — INT
  • Field (view_count) — INT

Untitled (Likes_posts)

  • Key (id) — BIGINT — Primary key — NOT NULL
  • Key (user_id) — INT — Foreign key → Untitled.Key — NOT NULL
  • Key (post_id) — BIGINT — Foreign key → Untitled.Key — NOT NULL