(columns: list[tuple])
| 2 | |
| 3 | |
| 4 | def _need_upgrade(columns: list[tuple]) -> bool: |
| 5 | for column in columns: |
| 6 | # PRAGMA table_info 返回 (cid, name, type, notnull, dflt_value, pk) |
| 7 | if column[1] == "size": |
| 8 | column_type = (column[2] or "").upper() |
| 9 | return "BIGINT" not in column_type |
| 10 | return False |
| 11 | |
| 12 | |
| 13 | async def migrate(): |