Seems the following migration never ran:
20191114160613_add_graph_to_polls.rb
and as such the polls table looks as follows:
Table "public.polls"
Column | Type | Modifiers
------------------+-----------------------------+----------------------------------------------------
id | bigint | not null default nextval('polls_id_seq'::regclass)
post_id | bigint |
name | character varying | not null default 'poll'::character varying
close_at | timestamp without time zone |
type | integer | not null default 0
status | integer | not null default 0
results | integer | not null default 0
visibility | integer | not null default 0
min | integer |
max | integer |
step | integer |
anonymous_voters | integer |
created_at | timestamp without time zone | not null
updated_at | timestamp without time zone | not null
Indexes:
"polls_pkey" PRIMARY KEY, btree (id)
"index_polls_on_post_id_and_name" UNIQUE, btree (post_id, name)
"index_polls_on_post_id" btree (post_id)
Foreign-key constraints:
"fk_rails_b50b782d08" FOREIGN KEY (post_id) REFERENCES posts(id)
Referenced by:
TABLE "poll_votes" CONSTRAINT "fk_rails_a6e6974b7e" FOREIGN KEY (poll_id) REFERENCES polls(id)
TABLE "poll_options" CONSTRAINT "fk_rails_aa85becb42" FOREIGN KEY (poll_id) REFERENCES polls(id)
Migrations are ran at every container launch via init containers, next question is understanding why this specific one was never scheduled.