Skip to content

Migration error while executing a column type change on batch-mode using SQLite3 #1621

Closed Answered by zzzeek
GabrielRomaoG asked this question in Usage Questions
Discussion options

You must be logged in to vote

alembic's SQLite dialect does not attempt to emit ALTER for a column when a batch migration is used.

I have copied your migration and run it, here's the output:

CREATE TABLE "_alembic_tmp_CategoryEvaluationResult" (
	"InteractionId" INTEGER NOT NULL, 
	"Justification" TEXT, 
	PRIMARY KEY ("InteractionId")
)


INFO  [sqlalchemy.engine.Engine] [no key 0.00004s] ()
INFO  [sqlalchemy.engine.Engine] INSERT INTO "_alembic_tmp_CategoryEvaluationResult" ("InteractionId", "Justification") SELECT "CategoryEvaluationResult"."InteractionId", "CategoryEvaluationResult"."Justification" 
FROM "CategoryEvaluationResult"
INFO  [sqlalchemy.engine.Engine] [generated in 0.00009s] ()
INFO  [sqlalchemy.engine.…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by GabrielRomaoG
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
Converted from issue

This discussion was converted from issue #1620 on March 10, 2025 18:52.