Add Column

Cancel

Current Schema

CREATE TABLE `survey`  (
  `id` text PRIMARY KEY,
  `user_id` text,
  `created_at` integer DEFAULT (CURRENT_TIMESTAMP),
  `updated_at` integer DEFAULT (CURRENT_TIMESTAMP),
  `completed_at` integer,
  `current_step` integer DEFAULT 1,
  `name` text,
  `email` text,
  `sex` text,
  `birthdate` text,
  `exercise_level` integer,
  `country_code` text,
  `state_code` text,
  `city` text,
  `zip_code` text,
  `address` text,
  `active_ingredient_ids` text DEFAULT '[]' NOT NULL,
  `selected_amount_by_active_ingredient_id` text DEFAULT '{}' NOT NULL,
  `active_ingredient_spending_config` text DEFAULT '{}' NOT NULL,
  `spending_by_active_ingredient_id` text DEFAULT '{}' NOT NULL,
  `time_per_dose_by_active_ingredient_id` text DEFAULT '{}' NOT NULL,
  `step_time_spent_seconds_by_step` text DEFAULT '{}' NOT NULL,
  `completed_step_numbers` text DEFAULT '[]' NOT NULL,
  `requested_active_ingredients` text DEFAULT '[]' NOT NULL,
  `last_partial_update_at` integer,
  `consent_to_contact` integer DEFAULT false,
  CONSTRAINT `fk_survey_user_id_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `user`(`id`)
)