-- Study 3: Cybersecurity Experiment
-- Run this once to create the results table

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

  -- Task behaviour (which tasks completed/skipped)
  tasks_json      TEXT,

  -- Manipulation checks
  manip_json      TEXT,

  -- Moral Foundations (advisor ratings)
  mfq_json        TEXT,

  -- Trust (Competence / Benevolence / Integrity)
  trust_json      TEXT,

  -- Advisor Attitudes
  attitudes_json  TEXT,

  -- Scenarios (Reporting / Seeking Advice / Compliance)
  scenarios_json  TEXT,

  -- Demographics
  demo_json       TEXT
);
