DROP TABLE "survey_responses";
DROP sequence survey_responses_id_seq;

CREATE TABLE "survey_responses" (
  "id" SERIAL NOT NULL UNIQUE PRIMARY KEY,
  "taker_id" int NOT NULL CONSTRAINT sr_ref_takers
    REFERENCES survey_takers(id) ON UPDATE CASCADE ON DELETE RESTRICT,
  "survey_id" varchar(64),
  "create_date" timestamp NOT NULL DEFAULT now()
);

CREATE INDEX "taker_id_idx" ON "survey_responses" ("taker_id");
CREATE INDEX "survey_id_idx" ON "survey_responses" ("survey_id");
