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

Failed to upgrade database: asyncpg.exceptions.NotNullViolationError: column "mx_room" contains null values #731

Closed
Half-Shot opened this issue Jan 5, 2022 · 1 comment

Comments

@Half-Shot
Copy link
Contributor

Seeing these after upgrading a host

[2022-01-05 16:43:16,517] [[email protected]] Failed to upgrade database
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/mautrix/util/async_db/database.py", line 94, in start
    await self.upgrade_table.upgrade(self)
  File "/usr/lib/python3.9/site-packages/mautrix/util/async_db/upgrade.py", line 124, in upgrade
    await upgrade(conn, db.scheme)
  File "/usr/lib/python3.9/site-packages/mautrix_telegram/db/upgrade/v03_reactions.py", line 37, in upgrade_v3
    await conn.execute("ALTER TABLE message ALTER COLUMN mx_room SET NOT NULL")
  File "/usr/lib/python3.9/site-packages/asyncpg/connection.py", line 318, in execute
    return await self._protocol.query(query, timeout)
  File "asyncpg/protocol/protocol.pyx", line 338, in query
asyncpg.exceptions.NotNullViolationError: column "mx_room" contains null values
@tulir
Copy link
Member

tulir commented Jan 5, 2022

🙀

@tulir tulir closed this as completed in da3180e Jan 5, 2022
pidongqianqian added a commit to kelaresg/mautrix-telegram that referenced this issue Jan 18, 2022
* master_tulir: (48 commits)
  Fix bug in !tg create. Fixes mautrix#736
  bridge state: use TRANSIENT_DISCONNECT if connection drops and is expected to come back soon
  Very basic support for live location
  Add support for t.me/+code invite links
  Bump version to 0.11.1
  Update some small things
  Make telegram blue text more readable on dark themes. Fixes mautrix#729
  Use min() instead of sorting list
  Update dependencies and fix some things in config updater
  Deduplicate lottieconverter calls in tgs_converter
  Delete nulls in message table. Fixes mautrix#731
  Update changelog
  Don't use parameters for pg_constraint query
  voice messages: bridge from Telegram to native Matrix
  Send message checkpoints for Matrix edits too
  Find constraint names dynamically to work around schemas broken by pgloader
  Add missing await to get_input_entity in HTML parser (mautrix#724)
  Don't redact reactions in chats with relaybot
  Don't alter columns to not null on sqlite
  Fix some things in dedup changes
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants