Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polls #63

Open
nic-hartley opened this issue Dec 14, 2018 · 0 comments
Open

Polls #63

nic-hartley opened this issue Dec 14, 2018 · 0 comments
Labels
discussion wanted We need to talk about this feature Something should be added

Comments

@nic-hartley
Copy link
Member

Goal

Exactly what the title says. Polls. Used by the admins to gauge relative interest in a set of options.

Description

Allow admins to create a poll, and allow users (anyone signed-in or just donators?) to vote on the poll. Since admins are making them, we can probably trust them with unfiltered HTML input, and polls will be rare enough that we can run them all by a dev before they're posted just in case.

Additional notes

Tables will probably look like this:

CREATE TABLE polls (
  pid SERIAL PRIMARY KEY,
  title TEXT NOT NULL,
  description TEXT NOT NULL,
  options TEXT ARRAY NOT NULL
)

CREATE TABLE poll_votes (
  vid SERIAL PRIMARY KEY,
  voter SERIAL REFERENCES users(uid) ON UPDATE CASCADE ON DELETE CASCADE,
  vote SERIAL
)

Creating a poll will require the user to be an admin; creating a poll_vote will only require the user to be signed in (or possibly a donator?)

@nic-hartley nic-hartley added feature Something should be added discussion wanted We need to talk about this labels Dec 14, 2018
@nic-hartley nic-hartley added this to the Public Production milestone Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion wanted We need to talk about this feature Something should be added
Projects
None yet
Development

No branches or pull requests

1 participant