Looking at the test database, the chat migrations appear not to have run.
> psql discourse_test
# \d
Oh …!
I forgot to add the first environment variable to include plugins with this db migration (because chat is still a plugin):
LOAD_PLUGINS=1 RAILS_ENV=test rake db:migrate