Try to drop identity in addition to default and id_seq in puppet/bot_chat tables
Closes #720 Closes #721 Co-authored-by: Carl Ambroselli <git@carl-ambroselli.de>
This commit is contained in:
@@ -73,10 +73,12 @@ async def migrate_legacy_to_v1(conn: Connection, scheme: str) -> None:
|
|||||||
ON UPDATE CASCADE ON DELETE SET NULL
|
ON UPDATE CASCADE ON DELETE SET NULL
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
await conn.execute("ALTER TABLE puppet ALTER COLUMN id DROP IDENTITY IF EXISTS")
|
||||||
await conn.execute("ALTER TABLE puppet ALTER COLUMN id DROP DEFAULT")
|
await conn.execute("ALTER TABLE puppet ALTER COLUMN id DROP DEFAULT")
|
||||||
await conn.execute("DROP SEQUENCE puppet_id_seq")
|
await conn.execute("DROP SEQUENCE IF EXISTS puppet_id_seq")
|
||||||
|
await conn.execute("ALTER TABLE bot_chat ALTER COLUMN id DROP IDENTITY IF EXISTS")
|
||||||
await conn.execute("ALTER TABLE bot_chat ALTER COLUMN id DROP DEFAULT")
|
await conn.execute("ALTER TABLE bot_chat ALTER COLUMN id DROP DEFAULT")
|
||||||
await conn.execute("DROP SEQUENCE bot_chat_id_seq")
|
await conn.execute("DROP SEQUENCE IF EXISTS bot_chat_id_seq")
|
||||||
await conn.execute("ALTER TABLE portal ALTER COLUMN config TYPE jsonb USING config::jsonb")
|
await conn.execute("ALTER TABLE portal ALTER COLUMN config TYPE jsonb USING config::jsonb")
|
||||||
await conn.execute(
|
await conn.execute(
|
||||||
"ALTER TABLE telegram_file ALTER COLUMN decryption_info TYPE jsonb "
|
"ALTER TABLE telegram_file ALTER COLUMN decryption_info TYPE jsonb "
|
||||||
|
|||||||
Reference in New Issue
Block a user