mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AJAXPoll
synced 2024-11-30 17:54:28 +00:00
525a37a284
Bug: T87542 Change-Id: I1089667c7228412fcb8f98702a8bad19abe76aa1
16 lines
583 B
SQL
16 lines
583 B
SQL
DROP SEQUENCE IF EXISTS ajaxpoll_vote_poll_vote_id_seq CASCADE;
|
|
CREATE SEQUENCE ajaxpoll_vote_poll_vote_id_seq;
|
|
|
|
CREATE TABLE IF NOT EXISTS ajaxpoll_vote (
|
|
poll_vote_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('ajaxpoll_vote_poll_vote_id_seq'),
|
|
poll_id TEXT NOT NULL default '',
|
|
poll_actor INTEGER NOT NULL,
|
|
poll_ip TEXT default NULL,
|
|
poll_answer SMALLINT default NULL,
|
|
poll_date TIMESTAMPTZ default NULL
|
|
);
|
|
|
|
ALTER SEQUENCE ajaxpoll_vote_poll_vote_id_seq OWNED BY ajaxpoll_vote.poll_vote_id;
|
|
|
|
CREATE UNIQUE INDEX poll_id_actor ON ajaxpoll_vote (poll_id, poll_actor);
|