Skip to content
This repository was archived by the owner on Sep 6, 2024. It is now read-only.

Fix running table altering migrations #68

Merged
merged 3 commits into from
Jul 27, 2024
Merged

Fix running table altering migrations #68

merged 3 commits into from
Jul 27, 2024

Conversation

ItsDrike
Copy link
Owner

Since SQLite doesn't support the ALTER TABLE command, running migrations that alter the structure of database tables with alembic fails. To fix this, alembic provides a render_as_batch option, which will instead create new tables, copy the data over from the old ones and then remove the old ones, bypassing this limitation.

@ItsDrike ItsDrike added the bug Something isn't working label Jul 27, 2024
@ItsDrike ItsDrike force-pushed the sqlite-migrations branch from 04b3aef to 7682038 Compare July 27, 2024 14:30
@Paillat-dev
Copy link
Collaborator

Would you mind also rebasing and then re-creating the initial migration?

@ItsDrike ItsDrike force-pushed the sqlite-migrations branch from 7682038 to a5c1990 Compare July 27, 2024 15:17
@ItsDrike ItsDrike merged commit 482666f into main Jul 27, 2024
7 checks passed
@ItsDrike ItsDrike deleted the sqlite-migrations branch July 27, 2024 15:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants