Resolve regex library warnings

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
This commit is contained in:
Emmanuel Ferdman
2025-05-25 03:15:52 -07:00
parent f2637c6627
commit 08792d7e7e
+1 -1
View File
@@ -912,7 +912,7 @@ class SqliteMigrator(SchemaMigrator):
@operation
def drop_column_default(self, table, column):
def _drop_default(column_name, column_def):
col = re.sub(r'DEFAULT\s+[\w"\'\(\)]+(\s|$)', '', column_def, re.I)
col = re.sub(r'DEFAULT\s+[\w"\'\(\)]+(\s|$)', '', column_def, flags=re.I)
return col.strip()
return self._update_column(table, column, _drop_default)