alter table jin_survey add use_captcha int(1) not null default 0;
alter table jin_survey_question add pagebreak int(1) not null default 0 after seq;
alter table jin_survey_data add page_completed int(2) not null default 0;
alter table jin_survey_data add archived int(1) not null default 0;
create index archived on jin_survey_data(archived);
alter table jin_survey add archive_after int(4) not null default 0;

create table jin_skip_branch_condition
(
  id                   int(11) not null primary key,

  scope_type           varchar(15) not null default '',
  scope_id             int(11) not null default 0,

  ord                  int(3) not null default 0,
  
  cond_type            varchar(10) not null default '',
  cond_obj_id          int(11) not null default 0,
  
  action               varchar(10) not null default '',

  key(scope_type,scope_id)
);
