Skip to content

Batch op: rename column then create index on it #1255

Discussion options

You must be logged in to vote

probably not, because the existing table being reflected does not have the "gamesession_id" column yet. it should have a nicer error message.

I would do the index drop/add stuff outside of the batch op because SQLite supports CREATE INDEX and DROP INDEX directly.

re: "atomiticy", SQLite supports transactional DDL. Follow the steps at https://docs.sqlalchemy.org/en/20/dialects/sqlite.html#pysqlite-serializable to work around driver issues.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

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

You must be logged in to vote
1 reply
@zzzeek
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants