Skip to content

Commit

Permalink
Fix version check for sqlite drop column support.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
coleifer committed Jan 14, 2024
1 parent d7d13d6 commit c597250
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion playhouse/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ')
Expand Down

0 comments on commit c597250

Please sign in to comment.