-- Phase 2.1: Profilfelder (zusätzlich zu profile_images)
CREATE DATABASE IF NOT EXISTS profile_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE profile_db;

CREATE TABLE IF NOT EXISTS user_profiles (
  user_id INT PRIMARY KEY,
  display_name VARCHAR(80) NULL,
  birth_date DATE NULL,
  birth_time TIME NULL,
  birth_city VARCHAR(120) NULL,
  gender ENUM('female','male','diverse','unknown') DEFAULT 'unknown',
  seeking ENUM('female','male','all','unknown') DEFAULT 'unknown',
  bio TEXT NULL,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

-- Optional: schneller Suchen/Filtern
CREATE INDEX idx_user_profiles_birth_dt ON user_profiles(birth_date, birth_time);
