CREATE TABLE IF NOT EXISTS save_snapshots (
  user_id TEXT PRIMARY KEY,
  version INTEGER NOT NULL,
  saved_at TEXT NOT NULL,
  bottom_tab TEXT NOT NULL,
  game_state_json JSONB NOT NULL,
  current_story_json JSONB,
  updated_at TEXT NOT NULL,
  FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);
