-- Drop and recreate table with individual columns
-- Run this in phpMyAdmin → urihertzjc1 → SQL

DROP TABLE IF EXISTS study3_results;

CREATE TABLE study3_results (
  id                    INT AUTO_INCREMENT PRIMARY KEY,
  prolific_id           VARCHAR(100),
  `condition`           VARCHAR(50),
  submitted_at          DATETIME DEFAULT CURRENT_TIMESTAMP,
  earnings              DECIMAL(4,2) DEFAULT 0,
  training_duration_sec INT DEFAULT 0,

  -- Tasks (1=completed, 0=skipped)
  task1  TINYINT, task2  TINYINT, task3  TINYINT, task4  TINYINT, task5  TINYINT,
  task6  TINYINT, task7  TINYINT, task8  TINYINT, task9  TINYINT, task10 TINYINT,

  -- Manipulation Check: Advisor Style (1-7)
  ms1 TINYINT, ms2 TINYINT, ms3 TINYINT,

  -- Manipulation Check: Framing (1-7)
  mf1 TINYINT, mf2 TINYINT, mf3 TINYINT,

  -- Moral Foundations (0-5)
  mfq1  TINYINT, mfq2  TINYINT, mfq3  TINYINT, mfq4  TINYINT,
  mfq5  TINYINT, mfq6  TINYINT, mfq7  TINYINT, mfq8  TINYINT,
  mfq9  TINYINT, mfq10 TINYINT, mfq11 TINYINT, mfq12 TINYINT,
  mfq13 TINYINT, mfq14 TINYINT, mfq15 TINYINT, mfq16 TINYINT,

  -- Trust: Competence (1-7)
  t1 TINYINT, t2 TINYINT, t3 TINYINT,
  -- Trust: Benevolence (1-7)
  t4 TINYINT, t5 TINYINT, t6 TINYINT,
  -- Trust: Integrity (1-7)
  t7 TINYINT, t8 TINYINT, t9 TINYINT,

  -- Advisor Attitudes (1-7)
  a1 TINYINT, a2 TINYINT, a3 TINYINT, a4 TINYINT, a5 TINYINT,
  a6 TINYINT, a7 TINYINT, a8 TINYINT, a9 TINYINT, a10 TINYINT,

  -- Scenarios (1-7)
  s1  TINYINT, s2  TINYINT, s3  TINYINT, s4  TINYINT,
  s5  TINYINT, s6  TINYINT, s7  TINYINT, s8  TINYINT,
  s9  TINYINT, s10 TINYINT, s11 TINYINT, s12 TINYINT,

  -- Demographics
  demo_gender        VARCHAR(50),
  demo_age           TINYINT,
  demo_education     VARCHAR(50),
  demo_ai_familiarity TINYINT
);
