Skip to content

Commit

Permalink
Cockroach ALTER COLUMN TYPE moved outside of transaction until #49351…
Browse files Browse the repository at this point in the history
… is solved.
  • Loading branch information
gnat committed Sep 1, 2022
1 parent c9af100 commit 62be177
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions piccolo/apps/migrations/auto/migration_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,4 +788,10 @@ async def run(self, backwards=False):
await self._run_drop_columns(backwards=backwards)
await self._run_drop_tables(backwards=backwards)
await self._run_rename_columns(backwards=backwards)
# CockroachDB: https://github.com/cockroachdb/cockroach/issues/49351 "ALTER COLUMN TYPE is not supported inside a transaction"
# We can move _run_alter_columns() for cockroach back here when the issue is resolved.
if engine.engine_type != "cockroach":
await self._run_alter_columns(backwards=backwards)

if engine.engine_type == "cockroach":
await self._run_alter_columns(backwards=backwards)

0 comments on commit 62be177

Please sign in to comment.