polly

Tables (6)

answers

  • id — BIGINT — Primary key
  • response_id — BIGINT — NOT NULL
  • question_id — BIGINT — NOT NULL
  • choice_id — BIGINT
  • text_answer — TEXT
  • id (id2) — BIGINT — Foreign key → responses.id
  • id (id3) — BIGINT — Foreign key → questions.id
  • id (id4) — BIGINT — Foreign key → choices.id

choices

  • id — BIGINT — Primary key
  • question_id — BIGINT — NOT NULL
  • content — VARCHAR(255) — NOT NULL
  • choice_order — INT — NOT NULL
  • id (id2) — BIGINT — Foreign key → questions.id

questions

  • id — BIGINT — Primary key
  • survey_id — BIGINT — NOT NULL
  • content — TEXT — NOT NULL
  • type — ENUM('MULTIPLE_CHOICE', 'TEXT') — NOT NULL
  • question_order — INT — NOT NULL
  • id (id2) — BIGINT — Foreign key → surveys.id

responses

  • id — BIGINT — Primary key
  • survey_id — BIGINT — NOT NULL
  • respondent_id — BIGINT
  • submitted_at — TIMESTAMP
  • ip_address — VARCHAR(45)
  • id (id2) — BIGINT — Foreign key → surveys.id
  • id (id3) — BIGINT — Foreign key → users.id

surveys

  • id — BIGINT — Primary key
  • user_id — BIGINT — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • description — TEXT
  • is_public — BOOLEAN
  • expires_at — TIMESTAMP
  • uuid — CHAR(36) — NOT NULL
  • created_at — TIMESTAMP
  • id (id2) — BIGINT — Foreign key → users.id

users

  • id — BIGINT — Primary key
  • email — VARCHAR(255) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(100) — NOT NULL
  • created_at — TIMESTAMP