From c597250c5adcf759c30284a7cdca72e00644ca82 Mon Sep 17 00:00:00 2001 From: Charles Leifer Date: Sun, 14 Jan 2024 12:52:50 -0600 Subject: [PATCH] Fix version check for sqlite drop column support. Originally it was set to 3.25, but that is only when RENAME column was added. DROP column was not added until 3.35. Fixes #2829 --- playhouse/migrate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playhouse/migrate.py b/playhouse/migrate.py index c04b5fd4b..cb0927603 100644 --- a/playhouse/migrate.py +++ b/playhouse/migrate.py @@ -859,7 +859,7 @@ def _fix_index(self, sql, column_to_update, new_column): @operation def drop_column(self, table, column_name, cascade=True, legacy=False): - if sqlite3.sqlite_version_info >= (3, 25, 0) and not legacy: + if sqlite3.sqlite_version_info >= (3, 35, 0) and not legacy: ctx = self.make_context() (self._alter_table(ctx, table) .literal(' DROP COLUMN ')