pastesrtht-initdb: paste_webhook_subscription not created

Message ID
DKIM signature
Download raw message

I'm trying to deploy paste.sr.ht. However pastesrtht-initdb doesn't 
create the paste_webhook_subscription database, which results in an 
exception when trying to create a paste:

ERROR in app: Exception on /new-paste [POST]
Traceback (most recent call last):
   File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1245, in _execute_context
   File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 581, in do_execute
     cursor.execute(statement, parameters)
psycopg2.errors.UndefinedTable: relation "paste_webhook_subscription" does not exist
LINE 2: FROM paste_webhook_subscription

My paste.sr.ht database looks like this after I ran pastesrht-initdb:
                 List of relations
  Schema |       Name        |   Type   |  Owner
  public | alembic_version   | table    | postgres
  public | blob              | table    | postgres
  public | blob_id_seq       | sequence | postgres
  public | oauthtoken        | table    | postgres
  public | oauthtoken_id_seq | sequence | postgres
  public | paste             | table    | postgres
  public | paste_file        | table    | postgres
  public | paste_file_id_seq | sequence | postgres
  public | paste_id_seq      | sequence | postgres
  public | user              | table    | postgres
  public | user_id_seq       | sequence | postgres
(11 rows)

And pastesrht-migrate says the 9b2c232477c9_add_pastes_webhook_tables.py 
script was ran, so the paste_webhook_subscription table should be there:
$ pastesrht-migrate history
9b2c232477c9 -> 72db8bd163a7 (head), Added paste visibility column
4e79c2cb0648 -> 9b2c232477c9, Add pastes webhook tables
5ddda71f7dd5 -> 4e79c2cb0648, Add OAuthToken table
<base> -> 5ddda71f7dd5, Strip empty filenames from DB

I tried to downgrade to 4e79c2cb0648, but that also doesn't work because 
there are no tables to delete. I didn't manage to do it the other way 
around (first initdb until 4e79c2cb0648 and then upgrade to 9b2c232477c9 
to possibly debug it), since there seems to be no way to have -migrate 
run the initialisation and -initdb doesn't offer any arguments.

I'm running Alpine 3.11, since that's what's recommended by the 
documentation. Any advice for how to solve/debug this would be greatly 

Best regards,
Message ID
<20200521114706.GA145060@aeY4i> (view parent)
DKIM signature
Download raw message
I just pushed a fix for this problem, it should be deployed to the
package repos witin a few minutes.