Fandom K

Tables (9)

artist_categories

  • category_id — INT — Primary key — NOT NULL
  • name — VARCHAR(20)
  • description — VARCHAR(100)
  • created_at — DATETIME — NOT NULL

artists

  • artist_id — INT — Primary key — NOT NULL
  • category_id — INT — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • bio — TEXT
  • category_id (category_id2) — INT — Foreign key → artist_categories.category_id — NOT NULL

credit_log

  • log_id — INT — Primary key — NOT NULL
  • user_id — INT — NOT NULL
  • credit_change — INT — NOT NULL
  • logged_at — DATETIME — NOT NULL
  • description — VARCHAR(200)
  • user_id (user_id2) — INT — Foreign key → users.user_id — NOT NULL

donation_types

  • donation_type_id — INT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • description — VARCHAR(100)
  • created_at — DATETIME — NOT NULL

donations

  • donation_id — INT — Primary key — NOT NULL
  • user_id — INT — NOT NULL
  • artist_id — INT — NOT NULL
  • donation_type_id — INT — NOT NULL
  • amount — INT — NOT NULL
  • donated_at — DATETIME — NOT NULL
  • user_id (user_id2) — INT — Foreign key → users.user_id — NOT NULL
  • artist_id (artist_id2) — INT — Foreign key → artists.artist_id — NOT NULL
  • donation_type_id (donation_type_id2) — INT — Foreign key → donation_types.donation_type_id — NOT NULL

favorites

  • fav_id — INT — Primary key — NOT NULL
  • user_id — INT — NOT NULL
  • artist_id — INT — NOT NULL
  • category_id — INT — NOT NULL
  • added_at — DATETIME — NOT NULL
  • user_id (user_id2) — INT — Foreign key → users.user_id — NOT NULL
  • artist_id (artist_id2) — INT — Foreign key → artists.artist_id — NOT NULL
  • category_id (category_id2) — INT — Foreign key → artist_categories.category_id — NOT NULL

monthly_artists

  • monthly_artist_id — INT — Primary key — NOT NULL
  • artist_id — INT — NOT NULL
  • year — INT — NOT NULL
  • month — INT — NOT NULL
  • rank — INT
  • vote_count — INT
  • created_at — DATETIME — NOT NULL
  • artist_id (artist_id2) — INT — Foreign key → artists.artist_id — NOT NULL

users

  • user_id — INT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • email — VARCHAR(100) — NOT NULL
  • credit_balance — INT — NOT NULL

votes

  • vote_id — INT — Primary key — NOT NULL
  • user_id — INT — NOT NULL
  • artist_id — INT — NOT NULL
  • credit_used — INT — NOT NULL
  • voted_at — DATETIME — NOT NULL
  • user_id (user_id2) — INT — Foreign key → users.user_id — NOT NULL
  • artist_id (artist_id2) — INT — Foreign key → artists.artist_id — NOT NULL